i've read the Zend API docs at php.net and they seem dated, but i haven't
found anything that deals with byref parameters using the new parameter
parsing API. so i have a few questions ...

1. Is it sufficient to have an zend_arg_info structure declaring that a
parameter is byref, and parse the value as a zval ?
e.g.
static
ZEND_BEGIN_ARG_INFO(arginfo_test, 0)
 ZEND_ARG_INFO(1,  name)
ZEND_END_ARG_INFO();

and then in the function...
PHP_FUNCTION(test)
{
    zval *name = null;
     if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &name) ==
FAILURE) {
      return;
    }
    zval_dtor(name);
    ZVAL_STRING(name, "Hello World", 1);
}

or do we need to use "z/" as a parameter specifier.

2. what does the "Z" (capital z) specifier to zend_parse_parameters do
3. am i stuck using the old parameter fetching API ?

l0t3k

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to