Re: [PHP-DEV] extended objects with read_property and get_property_ptr_ptr

2004-07-08 Thread Rob Richards
From: Zeev Suraski > The correct solution, I think, would be adding a boolean function (or even > just a bit) to the handlers structure, that instructs the engine whether it > should use get_ptr_ptr for incdec or not, since it's an > optimization. Maybe we can just check whether we're dealing wit

Re: [PHP-DEV] extended objects with read_property and get_property_ptr_ptr

2004-07-08 Thread Dominik del Bondio
Zeev Suraski zend.com> writes: > The correct solution, I think, would be adding a boolean function (or even > just a bit) to the handlers structure, that instructs the engine whether it > should use get_ptr_ptr for incdec or not, since it's an > optimization. Maybe we can just check whether w

Re: [PHP-DEV] extended objects with read_property and get_property_ptr_ptr

2004-07-07 Thread Zeev Suraski
At 22:27 07/07/2004, Rob Richards wrote: From: Zeev Suraski > It's not a correct fix :I get_ptr_ptr must return the address of an > allocated zval *, one which can later be separated, > etc. T(result->u.var).var.ptr doesn't fall into that category - it can be > gone in the next opcode... > > The

Re: [PHP-DEV] extended objects with read_property and get_property_ptr_ptr

2004-07-07 Thread Rob Richards
From: Zeev Suraski > It's not a correct fix :I get_ptr_ptr must return the address of an > allocated zval *, one which can later be separated, > etc. T(result->u.var).var.ptr doesn't fall into that category - it can be > gone in the next opcode... > > The only safe way to return a zval ** is fo

Re: [PHP-DEV] extended objects with read_property and get_property_ptr_ptr

2004-07-07 Thread Zeev Suraski
At 16:32 07/07/2004, Rob Richards wrote: Attached is a patch for zend_execute.c which will fall to read_property if get_property_ptr_ptr returns NULL in zend_fetch_property_address_inner. Hopefully this is the correct fix as it didnt break any tests and resolves the issue I hit. It's not a correct

Re: [PHP-DEV] extended objects with read_property and get_property_ptr_ptr

2004-07-07 Thread Rob Richards
Attached is a patch for zend_execute.c which will fall to read_property if get_property_ptr_ptr returns NULL in zend_fetch_property_address_inner. Hopefully this is the correct fix as it didnt break any tests and resolves the issue I hit. Rob From: Marcus Boerger > Sounds more like small oversig

Re: [PHP-DEV] extended objects with read_property and get_property_ptr_ptr

2004-07-06 Thread Marcus Boerger
Hello Rob, Tuesday, July 6, 2004, 12:15:31 PM, you wrote: > I was playing around with Bug #28817 and seem to have run into an issue > when overriding the read_property handler with an extended object (this > case a DomDocument object). > In order to support standard properties correctly, such as

[PHP-DEV] extended objects with read_property and get_property_ptr_ptr

2004-07-06 Thread Rob Richards
I was playing around with Bug #28817 and seem to have run into an issue when overriding the read_property handler with an extended object (this case a DomDocument object). In order to support standard properties correctly, such as $obj->myprop['a'] = 'b', the internal object needs to support ge