Re: Re: [PHP4BETA] cvs: /php4 php.h /php4/ext/standard file.c
| From: | Sterling Hughes | Date: | Mon, 01 May 2000 04:37:00 +0000 |
| Subject: | Re: Re: [PHP4BETA] cvs: /php4 php.h /php4/ext/standard file.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-14272@lists.php.net to get a copy of this message | ||
>At 09:32 PM 4/30/00 -0400, Sterling Hughes wrote:
>>Andi Gutmans wrote:
>> >
>> > andi Sun Apr 30 09:32:37 2000 EDT
>> >
>> > Modified files:
>> > /php4 php.h
>> > /php4/ext/standard file.c
>> > Log:
>> > - Take Sascha's advice and create on V_OPEN() which replaces open().
>> > - Unlike the other macros its argument has to have braces around it, for
>> > - example, open(filename, flags) becomse V_OPEN((filename, flags))
>> > - Made small conversion to new Zend macros. The ugly
>> (*foo)->value.str.val
>> > - now becomes Z_STRVAL_PP(foo). PP means pointer pointer, there also
>> exist
>> > - single P's for example foo->value.str.val becomes Z_STRVAL_P(foo).
>>
>>Is this the start of the Perlifying the internals:
>>
>>SvPv(foo) -- Perl
>>Z_STRVAL_PP(foo) -- Zend
>
>I have no idea how Perl does it, we just created these macro's because it
>started to be annoying to write (*foo)->value.str.val (Z_STRVAL_PP(foo)),
>foo->value.lval (Z_LVAL_P(foo)) and so on. I personally think they are
>quite nice and readable.
I agree, they are nice, I just happend to notice the similiarity between:
SvPv(foo) and Z_STRVAL_PP(foo)
or
SvIv(foo) and Z_LVAL_P(foo)
Sterling
-------------------
Email sent using AnyEmail (http://netbula.com/anyemail/)