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


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to