httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@apache.org>
Subject Re: cvs commit: httpd-2.0/modules/http mod_mime.c
Date Thu, 05 Sep 2002 16:12:04 GMT
On Thu, Sep 05, 2002 at 06:43:52AM -0700, Ian Holsman wrote:
> -1
> don't use magic numbers
> please use a #define

Sorry, but the rest of the server uses this strategy for flags.
Look specifically at IdentityCheck and ContentDigest.

The problem is that the AP_INIT_FLAG and ap_set_flag_slot passes
in 0, 1 and therefore that must correspond to Off and On.  Using a
local enum or a #define will break compatibility with how flags are
handled (because some genius may think they can change those values).
Therefore, I believe we have to stick with magic numbers.

And, due to directive inheritance, there is also needed a
special value for 'unset' - and the strategy we have used in
the past is to use 2.  

If you think it'd be better to rewrite all of the flag handling
code to use global enums, I'd agree, but I'm not going to do
that.  That will break all modules using flags.  -- justin

Mime
View raw message