On 2 June 2013 11:11, Johannes Schlüter <johan...@schlueters.de> wrote:
>
>
> On Jun 2, 2013, at 8:34, Pierre Joye <pierre....@gmail.com> wrote:
>
>>> Obviously there's a pretty significant ABI break here. I propose a "tweak"
>>> of the Z_* macros to "fix" that. Basically, Z_STRLEN() will cast the result
>>> to an int. This is the same behavior as today, and will mean that existing
>>> extensions continue to function exactly as today. But new extensions (and
>>> elsewhere in core) can use a new macro Z_STRSIZE() which will return the
>>> native size_t.
>>
>> A new macro will be a good solution, but I would name it what it
>> actually is, Z_SIZE_T.
>
> That's not what it is. It is the length of the string aka. 
> var.value.str.length as such it should indicate its relation to a string. So 
> something like Z_STRSIZE is  correct (and the name is nice thinking about 
> Unicode strings where length (characters) != size (bytes))

+1 for the idea
+1 for Z_STRSIZE
+1 for volunteering, as far as time permits!


--
Regards,
Mike

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

Reply via email to