about module constants values.
gojpeg at gmail.com
Wed Jan 20 08:58:02 MSK 2010
On 20.01.2010, at 8:36, langwan wrote:
> i find these constants, i would like to know the laws of the definition of what these values.
> because i want to add a core module, like NGX_HTTP_MODULE.
> #define NGX_CORE_MODULE 0x45524F43 /* "CORE" */
> #define NGX_CONF_MODULE 0x464E4F43 /* "CONF" */
> #define NGX_EVENT_MODULE 0x544E5645 /* "EVNT" */
> #define NGX_HTTP_MODULE 0x50545448 /* "HTTP" */
> #define NGX_MAIL_MODULE 0x4C49414D /* "MAIL" */
The question got the answer:
> 0x45524F43 /* "CORE" */
0x45524F43 is a 32-bit integer consists of thees four bytes: 0x45, 0x52, 0x4F and 0x43 for thees characters 'E' 'R' 'O' 'C' (reversed CORE). The comment tells what's encoded in integer ;) This means that one can define four chars long module type identifier. I think that's enough ;)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx