Fwd: [PECL-DEV] Linking 2 PHP extensions
| From: | ksheera sagar | Date: | Tue, 20 May 2008 11:15:53 +0000 |
| Subject: | Fwd: [PECL-DEV] Linking 2 PHP extensions | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-50135@lists.php.net to get a copy of this message | ||
---------- Forwarded message ----------
From: ksheera sagar <ksheera@gmail.com>
Date: May 20, 2008 4:43 PM
Subject: Re: [PECL-DEV] Linking 2 PHP extensions
To: Antony Dovgal <tony@daylessday.org>
Hi Antony,
Thanks for the reply.
Am developing an extension that makes use of PHP_FUNCTIONs defined in
some other
extension. The dependency using the macro PHP_ADD_EXTENSION_DEP() wont
make the access
of PHP_FUNCTIONs possible whereas it works for normal C functions
PHP_FUNCTION internally would get expanded to a C prototype. I could
call PHP_FUNCTIONs
prefixing with zif_ but am not finding a way to pass arguments to them.
Please help in this regard.
On 5/20/08, Antony Dovgal <tony@daylessday.org> wrote:
>
> On 20.05.2008 14:55, ksheera sagar wrote:
>
>> Hi, Consider two *PHP* extension A and B.
>>
>> Extension A exports a PHP_FUNCTION to userspace.. Let s call it Afunc().
>> Extension B exports a PHP_FUNCTION to userspace.. Let s call it Bfunc().
>>
>> Now, Is there any way to use Afunc1() inside the body of Bfunc()?
>>
>
> Why would you need to use _PHP_ function Afunc() inside another PHP
> function BFunc()?
> Export an internal C function (which is actually called in Afunc()) and use
> it in BFunc().
>
> To do that you need to make sure that A is loaded before B, which is what
> PHP_ADD_EXTENSION_DEP() in config.m4 takes care of.
>
> --
> Wbr, Antony Dovgal
>