Re: [PATCH] Add 'Z' flag to zend_parse_parameters*()

From: Date: Wed, 09 Jul 2003 05:01:01 +0000
Subject: Re: [PATCH] Add 'Z' flag to zend_parse_parameters*()
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-3324@lists.php.net to get a copy of this message
Certainly. One cannot use the convert_to_*_ex() functions unless you have a zval**. A couple people have suggested that I just use "z/", but this forces a separation and I may not need that. I want to be able to pass an array or an object to a group of functions. An object simply gets converted to an array with string indices. The "a" flag in zend_parse_parameters() does not automatically convert zvals to arrays, with good reason. From what I could tell, forcing a separation always does some work (unless the zval is a reference), and I just don't think that should be necessary. Basically, it brings back the functionality of get_parameters() and couples it with the niceness of zend_parse_parameters(). Josh Quoting Andi Gutmans <andi@zend.com>: > I don't quite understand how this is of added value over the existing "z". > Can you please explain in more detail? > > Thanks, > Andi > > At 07:05 PM 8/7/2003 -0500, fuhs@purdue.edu wrote: > >One more time. I hope it's not too obvious that I'm new at this :) > > > >This patch would add a 'Z' flag to zend_parse_parameters*(). > > > >Example: > > #typdef zvar zval** > > zvar a_zvar; > > zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &zvar); This should be: zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &a_zvar); > > > >Josh > > > >-- > >PHP Internals - PHP Runtime Development Mailing List > >To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.internals (#3324) next »