Re: New pow-function

From: Date: Tue, 03 Jul 2001 20:42:24 +0000
Subject: Re: New pow-function
References: 1 2 3 4 5 6 7  Groups: php.dev 
Request: Send a blank email to php-dev+get-58829@lists.php.net to get a copy of this message
On Tue, 03 Jul 2001, Jeroen van Wolffelaar wrote: > > And try to use ZEND_NUM_ARGS() wherever possible. Like here: > > > > zend_get_parameters_ex(ZEND_NUM_ARGS(),&zbase,&zexp); > > I'm fairly new to C, and surely new to the php-implementation, so I took > this from many, many other functions, where it was done that way... I > haven't noticed any function doing it like that :-) > > But sure, I'll keep it in mind. Though this is faster. And pow isn't likely > to change it's number of parameters :). ZEND_NUM_ARGS() is a preprocessor macro that expands to the number of arguments passed to the function -- it's not any slower than specifying a constant. -Andrei If you find a job that you love, you'll never work another day in your life. - Mark Jackson

« previous php.dev (#58829) next »