Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c
| From: | Ilia Alshanetsky | Date: | Fri, 22 Aug 2003 13:44:21 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c | ||
| References: | 1 2 | Groups: | php.zend-engine.cvs |
| Request: | Send a blank email to php-zend-engine-cvs+get-1660@lists.php.net to get a copy of this message | ||
On August 22, 2003 09:20 am, Zeev Suraski wrote:
> At 16:14 22/08/2003, Ilia Alshanetsky wrote:
> >On August 22, 2003 08:59 am, Zeev Suraski wrote:
> > > Why is it necessary? And anyway, hardcoded numbers like this aren't a
> > > good idea...
> >
> >As it now stands user defined constants do not have a module_number, which
> >means that any operation that tries use that field will be making an
> >operation on an undefined field.
This field is used by get_defined_constants() when an optional argument is
passed to the function. In this mode of operation the function returns an
associated array where constants are split into arrays based on the module
responsible for their creation.
> You probably want LONG_MAX or something like that..?
Correct, although using a separate define such as
#define PHP_USER_CONSTANT LONG_MAX
would make things clearer in the long run.
Ilia