Re: cvs: php4 /ext/standard array.c

From: Date: Fri, 05 Oct 2001 21:38:35 +0000
Subject: Re: cvs: php4 /ext/standard array.c
References: 1 2 3  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-7678@lists.php.net to get a copy of this message
On October 5, 2001 03:35 pm, Jeroen van Wolffelaar wrote: > > Then this should be the correct fix. String is duped in > > zend_hash_get_current_key_ex so no need for that in RETURN_STRINGL. > > Right? > > Are you sure the string is duped there? > > And STRINGL and STRING differ in wether or not specifying length > paramter, both versions have a 'dup' flag, so it should be STINGL > anyway, but wether dup should be 0 or 1 I'm not sure. > > I can't believe zend_hash_get_current_key_ex dups the string, because > it would be extremely bad for performance, since it isn't needed in > 99.9% of the cases. So I guess duplicating IS needed. Coincidentally, I was just reading the Zend API docs about this a few days ago: Here is a relevant passage: We've only discussed the so-called *_ex() API so far. You may have noticed that the API functions we've used are called zend_get_parameters_ex() instead of zend_get_parameters(), convert_to_long_ex() instead of convert_to_long(), etc. The *_ex() functions form the so-called new "extended" Zend API. They give a minor speed increase over the old API, but as a tradeoff are only meant for providing read-only access. ... More at http://www.zend.com/apidoc/x1084.php Cheers! --zak

« previous php.cvs (#7678) next »