Re: Warning about passing argumensts by reference

From: Date: Mon, 24 Nov 2003 16:39:48 +0000
Subject: Re: Warning about passing argumensts by reference
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-229@lists.php.net to get a copy of this message
Thanks Sara I knew there was a trick, and you saved me the trouble of having to find it. -- bob On Mon, 24 Nov 2003, Sara Golemon wrote: > > The problem is that odbtp_attach_field() is a PECL function and not a > > script declared function. What do I need to do in the C code declaration > > of this function to prevent this warning from occuring? Below is the code > > for this function. > > > > Make a structure in the same file where your PHP_FE(odbtp_attach_field, > NULL) declaration is: > > static > ZEND_BEGIN_ARG_INFO(third_arg_force_ref, 0) > ZEND_ARG_PASS_INFO(0) > ZEND_ARG_PASS_INFO(0) > ZEND_ARG_PASS_INFO(1) > ZEND_END_ARG_INFO() > > Then change your FE declaration to: > > PHP_FE(odbtp_attach_field, third_arg_force_ref) > > > Then in your script simply don't bother trying to pass your argument by > reference, the function handler will know how to deal with it. > > -Sara > >

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