Question: How do you get a zval** in a non-deprecated way?

php.internals

Unnamed Person

23 years ago
Hello, I would like to use zend_parse_parameters() to retrieve a zval** but it currently does not do this. get_parameters() which does return zval**'s has been deprecated. I don't want to use the '/' option with zend_parse_parameters() because zval separation may not be necessary, and I would like to avoid it whenever possible. Josh

Sascha Schumann

23 years ago
On Tue, 8 Jul 2003 fuhs@purdue.edu wrote:
> Hello, > > I would like to use zend_parse_parameters() to retrieve a zval** but it > currently does not do this. get_parameters() which does return zval**'s has been > deprecated. I don't want to use the '/' option with zend_parse_parameters() > because zval separation may not be necessary, and I would like to avoid it > whenever possible.
The old APIs are not really deprecated. The new APIs are simply recommended over the old ones. So, if you are running into a case where zend_get_parameters works better for you, go ahead and use it. - Sascha

Unnamed Person

23 years ago
Ok, thanks. Is there a reason why this functionality is not supported in the new API? Josh Quoting Sascha Schumann <sascha@schumann.cx>:

(Marcus Börger)

23 years ago
Hello fuhs, Tuesday, July 8, 2003, 11:58:24 PM, you wrote: fpe> Ok, thanks. fpe> Is there a reason why this functionality is not supported in the new API? Lazyness? Provide a patch and maybe someone adds it. I guess you're not the own who ran into this :-)
-- Best regards, Marcus mailto:helly@php.net

Unnamed Person

23 years ago
I had asked about this before, but I ran into some kind of confirmation thing and the discussion stopped. 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); Zend/zend_API.c RELEASE ver 4.3.1 425c425,434 < ---
> case 'Z': > { > zval ***p=va_arg(*va, zval ***); > if(Z_TYPE_PP(arg) == IS_NULL &&
return_null){
> *p = NULL; > } else { > *p = arg; > } > } > break;
474c483 < case 'z': ---
> case 'z': case 'Z':
Josh Quoting Marcus Börger <marcus.boerger@t-online.de>:

Wez Furlong

23 years ago
make it a unified diff (see the README.SUBMITTING-PATCH doc in the php source). You probably want to CC the revised patch to andrei@php.net as well as the list. --Wez. ----- Original Message ----- From: <fuhs@purdue.edu> To: "Marcus Börger" <helly@php.net> Cc: <internals@lists.php.net> Sent: Tuesday, July 08, 2003 11:11 PM Subject: Re: Re[2]: [PHP-DEV] Question: How do you get a zval** in a non-deprecated way?
> I had asked about this before, but I ran into some kind of confirmation
thing

Unnamed Person

23 years ago
Second time around. 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);

Andrei Zmievski

23 years ago
On Tue, 08 Jul 2003, fuhs@purdue.edu wrote:
> I had asked about this before, but I ran into some kind of confirmation thing > and the discussion stopped. > > 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);
First off, what do you need access to zval** for, exactly? -Andrei A room without books is like a body without a soul. -- Marcus Tullius Cicero (106-43 B.C.)