Re: zend_call_method

From: Date: Tue, 07 Sep 2010 17:18:04 +0000
Subject: Re: zend_call_method
References: 1 2  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-7612@lists.php.net to get a copy of this message
2010/9/7 Johannes Schlüter <johannes@php.net>: > On Tue, 2010-09-07 at 03:40 -0700, Nicolas Brousse wrote: >> Fatal error: Class entry requested for an object without PHP class in >> Unknown on line 0 >> >> I'm not sure to understand what does it mean. Any clue ? >> >> +        zval *rv; >> +        zend_function *free; >> +        zend_hash_find(&intern->std.ce->function_table, "free", >> sizeof("free"),(void **) &free); >> +        zend_call_method_with_0_params((zval **) object, intern->std.ce, &free >> , "free", &rv); > > So where does "object" come from, where is it set? :-) Sorry, I just copied a small part of a diff. I'm trying to get my object calling the "free" method before being destruct, so I'm calling that inside a zend_objects_store_dtor_t method : static void judy_object_destroy_object(zend_object *object, zend_object_handle handle TSRMLS_DC) { ... } So, I guess I'm getting confuse with the zend_object being passed ? > In a related note: Don't do the lookup yourself but either pass NULL as > fn_proxy or pass an pointer which will be filled by the engine after > _the engine_ did the lookup in order to speedup subsequent calls. > Probably you also can use NULL as class entry, unless you need the scope > function to access a private or inherited method. Thanks for this info, I fixed that. Nico.

« previous php.pecl.dev (#7612) next »