Overloaded class registration
| From: | Evan Nemerson | Date: | Tue, 16 Nov 2004 20:01:25 +0000 |
| Subject: | Overloaded class registration | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-13875@lists.php.net to get a copy of this message | ||
Hi everyone,
I noticed recently that both of my extensions (Panda and FANN, both in PECL)
emit error messages when their __get() and __set() methods are registered.
The problem seems to be that fptr.common->num_args is always 0 in
zend_check_magic_method_implementation(), regardless of what I set them to
prior to registration.
The functions still work perfectly, and valgrind doesn't complain. There's
just an incredibly annoying error message every time. It's entirely possible
(if not probable) that it's my code that's wrong, not ZE2, but I can't for
the life of me figure it out.
The pertinant portion of the code is based on the SOAP extension. The source
code for the fann extension is at
http://cvs.sourceforge.net/viewcvs.py/*checkout*/fann/fannphp/fann.c?rev=1.13
I tried pecl-dev last week, and the only suggestion I got was using the
read_property and write_property callbacks instead of the __get() and
__post() methods, but I don't really think that's an option. The thread is at
http://marc.theaimsgroup.com/?l=pecl-dev&m=110012046408453&w=2
Thanks.
--
Evan Nemerson
evan@coeus-group.com
http://coeusgroup.com/en