On Tue, 2013-07-30 at 15:37 +0500, Ruslan Osmanov wrote: > > So what is the proper way to deal with zend_fcall_info.object_ptr's > refcount? I didn't find a Zend API function to copy fcall info. > I also didn't find a way to obtain the caller's "this_ptr" pointer. > EG(This) points to current (Event) this_ptr, not Foo's this_ptr.
This hit me, too. I once thought about "fixing" this in zend_parse_parameters but figured this would cause an anomaly where the caller suddenly has to free memory allocated in zpp. My solution for this is here: https://github.com/johannes/php-test-helpers/blob/master/test_helpers.c#L342 and here https://github.com/johannes/php-test-helpers/blob/master/test_helpers.c#L178 hope this helps, johannes -- PECL development discussion Mailing List (http://pecl.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
