diff options
| author | Andi Gutmans <andi@php.net> | 2003-07-11 10:21:39 +0000 |
|---|---|---|
| committer | Andi Gutmans <andi@php.net> | 2003-07-11 10:21:39 +0000 |
| commit | 939ab686374858aaa9ce09bacc1542a260b7a5bd (patch) | |
| tree | 816a0fe5055277b00c936273db5d2afe20f2cfe2 | |
| parent | 2deb3c224da34ce53ce4a92262414ddd2f7f33b2 (diff) | |
| download | php-git-939ab686374858aaa9ce09bacc1542a260b7a5bd.tar.gz | |
- 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 <fuhs@purdue.edu>)
| -rw-r--r-- | Zend/zend_API.c | 13 |
1 files changed, 11 insertions, 2 deletions
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; |
