Re: [PHP-DEV] Improved zend_string API

2015-07-02 Thread Bob Weinand
> Am 01.07.2015 um 18:32 schrieb 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.) > >

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-07-01 Thread Bob Weinand
> Am 30.06.2015 um 20:16 schrieb 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 abst

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 reaso

Re: [PHP-DEV] Improved zend_string API

2015-06-30 Thread Levi Morrison
On Tue, Jun 30, 2015 at 8:15 AM, Bob Weinand wrote: >> Am 30.06.2015 um 12:53 schrieb 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 un

Re: [PHP-DEV] Improved zend_string API

2015-06-30 Thread Bob Weinand
> Am 30.06.2015 um 12:53 schrieb 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. > >

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 see

Re: [PHP-DEV] Improved zend_string API

2015-06-29 Thread Bob Weinand
> Am 30.06.2015 um 05:44 schrieb 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) in

Re: [PHP-DEV] Improved zend_string API

2015-06-29 Thread Bob Weinand
> Am 30.06.2015 um 04:37 schrieb 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 t

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)

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 wrote: >

RE: [PHP-DEV] Improved zend_string API

2015-06-29 Thread Pierre Joye
On Jun 30, 2015 9:38 AM, "François Laupretre" 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 Bob Weinand
Hey Dmitry, > Am 29.06.2015 um 15:46 schrieb Dmitry Stogov : > > 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

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 'ver

Re: [PHP-DEV] Improved zend_string API

2015-06-29 Thread Aaron Piotrowski
ent: 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, but I'd like to object

Re: [PHP-DEV] Improved zend_string API

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

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 li

Re: [PHP-DEV] Improved zend_string API

2015-06-29 Thread Bob Weinand
> Am 29.06.2015 um 15:46 schrieb Dmitry Stogov : > > 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 > wrote: > >> Hi, >> >> >> >> OK, I didn’t understand Dmitry’s comment on ‘aggressively’