Hey Dmitry,

> Am 29.06.2015 um 15:46 schrieb Dmitry Stogov <dmi...@zend.com>:
> 
> Committed except of ZVAL_STR_INC/DEC_LEN() and some other unused macros.
> 
> Thanks. Dmitry.

I see you changed the ZSTR_* macros to be pure aliases of the equivalent 
structure members.

May I now honestly ask where the benefit of those macros is?

ZSTR_VAL(str) instead of str->val
ZSTR_H(str) instead of str->h
ZSTR_LEN(str) instead of str->len

What is the point here? It's obvious why we have Z_* macros for the zval: 
because of the unions. (Like nobody wants to write zv->value.lval instead of 
just Z_LVAL_P(zv))
It's a good thing to hide that union here. (Though I'd prefer anon unions, but 
as I'm not sure what MSVC support here is, so no comment.)

But there's no such reason for zend_string…
Hence the question remains, what value does it bring for zend_string? Except 
that it obviously makes code harder to read? (It's longer, you can't be sure 
about potential side effects etc.)

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

Reply via email to