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

From: Date: Wed, 22 Feb 2006 19:16:38 +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-4614@lists.php.net to get a copy of this message
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; + }


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