RE: [PHP-DEV] Internal class, read_property() and type == BP_VAR_W
| From: | Dmitry Stogov | Date: | Fri, 28 Oct 2005 15:55:40 +0000 |
| Subject: | RE: [PHP-DEV] Internal class, read_property() and type == BP_VAR_W | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-19786@lists.php.net to get a copy of this message | ||
read_property(BP_VAR_W) will never work for all cases.
Probably you can return proxy object with get() and set() callbacks, but I
am not sure if it will work for references too.
So if you can return zval** you should use get_property_ptr_ptr().
Dmitry.
> -----Original Message-----
> From: Michael Wallner [mailto:mike@php.net]
> Sent: Friday, October 28, 2005 7:23 PM
> To: internals@lists.php.net
> Subject: Re: [PHP-DEV] Internal class, read_property() and
> type == BP_VAR_W
>
>
> Hi Dmitry Stogov, you wrote:
>
> > Hi Michael,
> >
> > You should define get_property_ptr_ptr() callback to support such
> > assignments.
>
> Yeah, I looked at that, but what do I gain?
> get_property_ptr_ptr() will be used for both described cases
> and instead of returning a zval* I'd have
> to return a zval**, but I could miss the obvious, and if
> that's the case,
> don't hesitate to drop me a quick pointer in the right direction!
>
> Thanks a lot Dmitry,
> --
> Michael - <mike(@)php.net>
> http://dev.iworks.at/ext-http/http-functions.html.gz
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>