Re: [PHP-DEV] Improved zend_string API

2015-07-02 Thread Bob Weinand
Am 01.07.2015 um 18:32 schrieb François Laupretre franc...@php.net: De : Bob Weinand [mailto:bobw...@hotmail.com] Interesting idea (from the concept). I even could get on board with this; I'm just not that sure about the performance impact. (alignment of refcount to base address etc.)

Re: [PHP-DEV] Improved zend_string API

2015-07-01 Thread Bob Weinand
Am 30.06.2015 um 20:16 schrieb François Laupretre franc...@php.net: De : morrison.l...@gmail.com [mailto:morrison.l...@gmail.com] De la part Just to time in with my $0.02: I feel that using macros as an abstraction in this case is bad practice. I believe that in *most* cases macros as an

RE: [PHP-DEV] Improved zend_string API

2015-07-01 Thread François Laupretre
De : Bob Weinand [mailto:bobw...@hotmail.com] Interesting idea (from the concept). I even could get on board with this; I'm just not that sure about the performance impact. (alignment of refcount to base address etc.) zend_string *s; s = zend_string_alloc(256, 0);

RE: [PHP-DEV] Improved zend_string API

2015-06-30 Thread François Laupretre
De : Bob Weinand [mailto:bobw...@hotmail.com] Precisely. Instead of tight coupling to the structure, we now couple to the macro… and it's not like the macro will be left untouched once we change the underlying structure. There are different levels of encapsulation : 1st level can be seen as

Re: [PHP-DEV] Improved zend_string API

2015-06-30 Thread Levi Morrison
On Tue, Jun 30, 2015 at 8:15 AM, Bob Weinand bobw...@hotmail.com wrote: Am 30.06.2015 um 12:53 schrieb François Laupretre franc...@php.net: De : Bob Weinand [mailto:bobw...@hotmail.com] Precisely. Instead of tight coupling to the structure, we now couple to the macro… and it's not like the

Re: [PHP-DEV] Improved zend_string API

2015-06-30 Thread Bob Weinand
Am 30.06.2015 um 12:53 schrieb François Laupretre franc...@php.net: De : Bob Weinand [mailto:bobw...@hotmail.com] Precisely. Instead of tight coupling to the structure, we now couple to the macro… and it's not like the macro will be left untouched once we change the underlying structure.

RE: [PHP-DEV] Improved zend_string API

2015-06-30 Thread François Laupretre
De : morrison.l...@gmail.com [mailto:morrison.l...@gmail.com] De la part Just to time in with my $0.02: I feel that using macros as an abstraction in this case is bad practice. I believe that in *most* cases macros as an abstraction is a bad practice. Furthermore, there isn't any reason

Re: [PHP-DEV] Improved zend_string API

2015-06-29 Thread Bob Weinand
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. On Mon, Jun 29, 2015 at 4:23 PM, François Laupretre franc...@php.net wrote: Hi, OK, I didn’t understand Dmitry’s comment on

RE: [PHP-DEV] Improved zend_string API

2015-06-29 Thread Anatol Belski
Hi Bob, -Original Message- From: Bob Weinand [mailto:bobw...@hotmail.com] Sent: Monday, June 29, 2015 6:44 PM To: Dmitry Stogov Cc: francois; Anatol Belski; Anatol Belski; PHP Internals Subject: Re: [PHP-DEV] Improved zend_string API Hey, looks like I'm a bit late to the party

Re: [PHP-DEV] Improved zend_string API

2015-06-29 Thread Aaron Piotrowski
Stogov Cc: francois; Anatol Belski; Anatol Belski; PHP Internals Subject: Re: [PHP-DEV] Improved zend_string API Hey, looks like I'm a bit late to the party, but I'd like to object against the accessor macros on zend_string. What does it help to replace very nice -val, -len etc. with macros

Re: [PHP-DEV] Improved zend_string API

2015-06-29 Thread Bob Weinand
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

RE: [PHP-DEV] Improved zend_string API

2015-06-29 Thread François Laupretre
De : Aaron Piotrowski [mailto:aa...@icicle.io] Envoyé : mardi 30 juin 2015 04:16 À : Bob Weinand; Anatol Belski Cc : internals@lists.php.net Objet : Re: [PHP-DEV] Improved zend_string API On Jun 29, 2015, at 7:37 PM, Bob Weinand bobw...@hotmail.com wrote: Hey Anatol, Am

Re: [PHP-DEV] Improved zend_string API

2015-06-29 Thread Bob Weinand
: [PHP-DEV] Improved zend_string API Hey, looks like I'm a bit late to the party, but I'd like to object against the accessor macros on zend_string. What does it help to replace very nice -val, -len etc. with macros? ZSTR_VAL(str)[ZSTR_LEN(str)] = 0; or str-val[str-len] = 0

RE: [PHP-DEV] Improved zend_string API

2015-06-29 Thread François Laupretre
Hi, -Message d'origine- De : Bob Weinand [mailto:bobw...@hotmail.com] Hey, looks like I'm a bit late to the party, but I'd like to object against the accessor macros on zend_string. What does it help to replace very nice -val, -len etc. with macros? If you find it 'very nice',

RE: [PHP-DEV] Improved zend_string API

2015-06-29 Thread Pierre Joye
On Jun 30, 2015 9:38 AM, François Laupretre franc...@php.net wrote: Hi, -Message d'origine- De : Bob Weinand [mailto:bobw...@hotmail.com] Hey, looks like I'm a bit late to the party, but I'd like to object against the accessor macros on zend_string. What does it help to

RE: [PHP-DEV] Improved zend_string API

2015-06-29 Thread François Laupretre
De : Bob Weinand [mailto:bobw...@hotmail.com] 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

Re: [PHP-DEV] Improved zend_string API

2015-06-29 Thread Bob Weinand
Am 30.06.2015 um 04:37 schrieb François Laupretre franc...@php.net: Hi, -Message d'origine- De : Bob Weinand [mailto:bobw...@hotmail.com] Hey, looks like I'm a bit late to the party, but I'd like to object against the accessor macros on zend_string. What does it help to

Re: [PHP-DEV] Improved zend_string API

2015-06-29 Thread Bob Weinand
Am 30.06.2015 um 05:44 schrieb François Laupretre franc...@php.net: De : Bob Weinand [mailto:bobw...@hotmail.com] 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)