Re: cvs: pecl /freeimage freeimage.c
| From: | Andrey Hristov | Date: | Wed, 07 Jan 2004 07:44:23 +0000 |
| Subject: | Re: cvs: pecl /freeimage freeimage.c | ||
| References: | 1 2 3 | Groups: | php.pecl.cvs |
| Request: | Send a blank email to pecl-cvs+get-655@lists.php.net to get a copy of this message | ||
Hi,
there is a nice article about streams written by Wez for International PHP Magazine.
You can find it here : http://www.php-mag.net/itr/online_artikel/psecom,id,368,nodeid,114.html
I hope that this will help you. Thanks to Wez that he wrote it and the magazine that it gives it for online reading.
Regaerds,
Andrey
Wenlong Wu wrote:
"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 thecodeis 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_ARGSexplicitly. It willbe done by zend_parse_params(). The latter will emit a warning in caseswhen the call iseroneous and then you don't need to use WRONG_PARAM_COUNT but just return;(which willreturn NULL to the userland. if you need FALSE, then you canRETURN_FALSE).Regards, AndreyHi, 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