Re: Re: cvs: pecl /newt newt.c

From: Date: Mon, 16 Aug 2004 13:59:25 +0000
Subject: Re: Re: cvs: pecl /newt newt.c
References: 1 2 3  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-1175@lists.php.net to get a copy of this message
Hello Has zend_get_parameters_array_ex been suggested yet? http://www.php.net/manual/en/zend.arguments.variable.php You do need to declare an array before calling this, so there would be a hard coded limit to the number of arguments your function could accept. But if this isn't a problem, zend_get_parameters_array_ex would be the right function to use. You could use the C function vsprintf by constructing a va_list from the optional arguments - probably quicker than calling a PHP function to do the same job. Hope this helps. Swithun. > The problem is that these functions get a variable number of arguments, > like in printf(...): > > proto newt_win_ternary (string title, string button1_text, string button2_text, string > button3_text, string format [, mixed args [,mixed...]]) > > So, I need to "cut" first four arguments, others I pass in an array to the PHP > sprintf() function. I just didn't see a way how could I achieve that by > using zend_parse_parameters() ... >

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