I'll try.
Dmitry.
> -----Original Message-----
> From: Andrei Zmievski [mailto:andrei@xxxxxxxxxxxxxx]
> Sent: Wednesday, February 22, 2006 10:17 PM
> To: Dmitry Stogov
> Cc: zend-engine-cvs@xxxxxxxxxxxxx
> 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
>
>
>
--
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
|