Re: cannot define a method named lookup in ext

From: Date: Thu, 27 Nov 2008 09:02:37 +0000
Subject: Re: cannot define a method named lookup in ext
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-5927@lists.php.net to get a copy of this message
On 27.11.2008 07:53, Surf Chen wrote: > I built a ext,which have a method named lookup.After I making .so and > running test file,it said that method is undefined. "lookup" is a macro defined in php_compat.h and it's replaced with "php_lookup", which you could have figured out with simple "var_dump(get_object_methods($b));". In order to avoid replacing you must declare it this way: ZEND_NAMED_FUNCTION(ZEND_MN(ssss_lookup)) <----- { RETURN_DOUBLE(3.14); } static zend_function_entry ssss_methods[] = { PHP_ME(ssss, __construct, NULL, ZEND_ACC_PUBLIC) ZEND_FENTRY(lookup, ZEND_MN(ssss_lookup), NULL, ZEND_ACC_PUBLIC) <--- .... > I report a bug ,but someone said it is not a bug: > http://bugs.php.net/bug.php?id=46676 > so I post it here. Questions regarding 3rd party extension development surely do not belong to the bug tracker. -- Wbr, Antony Dovgal

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