Re: cvs: pecl /freeimage freeimage.c
| From: | Wenlong Wu | Date: | Wed, 07 Jan 2004 01:07:18 +0000 |
| Subject: | Re: cvs: pecl /freeimage freeimage.c | ||
| References: | 1 2 | Groups: | php.pecl.cvs |
| Request: | Send a blank email to pecl-cvs+get-654@lists.php.net to get a copy of this message | ||
"Andrey Hristov" <php@hristov.com> ??????:3FFAAA5A.1080901@hristov.com...
> Hi,
> zend_get_parameters_ex() is faster than zend_parse_parameters, but if you
> don't need performance it's ok to use zend_parse_parameters. And if the
code
> is already working there is probably no need to slow it down :)
> Also one point more :
> Consider code like this :
> if (ZEND_NUM_ARGS() != 2 || zend_parse_parameters(ZEND_NUM_ARGS()
TSRMLS_CC, "rd", &z_dib,
> &percentage) == FAILURE) {
> WRONG_PARAM_COUNT;
> }
> Except for performance reasons you don't need to check ZEND_NUM_ARGS
explicitly. It will
> be done by zend_parse_params(). The latter will emit a warning in cases
when the call is
> eroneous and then you don't need to use WRONG_PARAM_COUNT but just return;
(which will
> return NULL to the userland. if you need FALSE, then you can
RETURN_FALSE).
>
> Regards,
> Andrey
>
Hi,
Thank you for your help, I'm still only a newbie at present and I will
continue studying hard with ZEND API.
I'v meet a trouble to write this extension, I don't know how to let
freeimage_loadfromhandle function to work fine.
That is to say how to use php_stream?
Help me please!
Regards,
Wenlong