RE: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c zend_constants.c

From: Date: Fri, 24 Feb 2006 08:50:48 +0000
Subject: RE: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c zend_constants.c
References: 1  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-4619@lists.php.net to get a copy of this message
I'll try. Dmitry. > -----Original Message----- > From: Andrei Zmievski [mailto:andrei@gravitonic.com] > Sent: Wednesday, February 22, 2006 10:17 PM > To: Dmitry Stogov > Cc: zend-engine-cvs@lists.php.net > Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / > zend_builtin_functions.c zend_constants.c > > > Dmitry, > > Please use eumalloc, peumalloc and related functions instead of > resorting to UBYTES. > > -Andrei > > On Feb 22, 2006, at 2:02 AM, Dmitry Stogov wrote: > > > + if (c->name.s) { > > + ustr = malloc(UBYTES(c->name_len)); > > + u_charsToUChars(c->name.s, ustr, c->name_len); > > + free(c->name.s); > > + c->name.u = ustr; > > + } > > + if (Z_TYPE(c->value) == IS_STRING || Z_TYPE(c->value) == > > IS_CONSTANT) { > > + ustr = > pemalloc(UBYTES(Z_STRLEN(c->value)+1), c->flags & > > CONST_PERSISTENT); > > + u_charsToUChars(Z_STRVAL(c->value), > ustr, Z_STRLEN(c->value)+1); > > + pefree(Z_STRVAL(c->value), c->flags & > CONST_PERSISTENT); > > + Z_USTRVAL(c->value) = ustr; > > + if (Z_TYPE(c->value) == IS_STRING) > Z_TYPE(c->value) = IS_UNICODE; > > + } > > -- > Zend Engine CVS Mailing List (http://cvs.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > >

« previous php.zend-engine.cvs (#4619) next »