From: Andi Gutmans Date: Fri, 11 Jul 2003 10:21:39 +0000 (+0000) Subject: - Add support for Z in zend_parse_parameters(). It will allow the extension X-Git-Tag: BEFORE_ARG_INFO~282 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=939ab686374858aaa9ce09bacc1542a260b7a5bd;p=php - Add support for Z in zend_parse_parameters(). It will allow the extension - to retreive the zval **, thus allowing it to use the convert_to_*_ex() - family of functions to do type conversions without effecting the value in - the engine itself. (Josh Fuhs ) --- diff --git a/Zend/zend_API.c b/Zend/zend_API.c index be11cf6e62..3fd96ece62 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -430,7 +430,16 @@ static char *zend_parse_arg_impl(zval **arg, va_list *va, char **spec TSRMLS_DC) } } break; - + case 'Z': + { + zval ***p = va_arg(*va, zval ***); + if (Z_TYPE_PP(arg) == IS_NULL && return_null) { + *p = NULL; + } else { + *p = arg; + } + } + break; default: return "unknown"; } @@ -476,7 +485,7 @@ static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int fl case 's': case 'b': case 'r': case 'a': case 'o': case 'O': - case 'z': + case 'z': case 'Z': max_num_args++; break;