]> granicus.if.org Git - php/commitdiff
- Add support for Z in zend_parse_parameters(). It will allow the extension
authorAndi Gutmans <andi@php.net>
Fri, 11 Jul 2003 10:21:39 +0000 (10:21 +0000)
committerAndi Gutmans <andi@php.net>
Fri, 11 Jul 2003 10:21:39 +0000 (10:21 +0000)
- 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>)

Zend/zend_API.c

index be11cf6e6281258fa25fd65860bef7502e5273b7..3fd96ece62b7546e22a7113aee03ff436b2e2e96 100644 (file)
@@ -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;