Re: Re: zpp and zend_string
| From: | Anatol Belski | Date: | Wed, 27 Aug 2014 06:51:11 +0000 |
| Subject: | Re: Re: zpp and zend_string | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-76899@lists.php.net to get a copy of this message | ||
Hi Tjerk,
On Wed, August 27, 2014 07:34, Tjerk Meesters wrote:
> Hi internals,
>
>
> With the recent merge of int64 the
zend_string type now uses
> size_t
> to store its length, but ZPP (and friends) still use int * to
> store the
> parsed string lengths.
>
> http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_API.c#519
>
>
Yep, this is a good question, as that zend_string uses size_t for the
length now with 'S', but 's' goes the old way. IMHO we should let it be as
it is, or even enforce 's' length to be exact unsigned 32 bit. And, we
should check for places where we need the conversion to zend_string -
those are
- where we work with pure strings in PHP, like substr() for example
- where the dependency library requieres or supports that
As example - it makes no sense to use zend_string for zlib or ICU, but
it's fulle justified for iconv.
Regards
Anatol