zval "passthrough"?
| From: | David Olsson | Date: | Tue, 04 Oct 2005 12:14:41 +0000 |
| Subject: | zval "passthrough"? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-19391@lists.php.net to get a copy of this message | ||
Hello
I'm writing a PHP extension in C++ which need to provide a function which will take as a parameter a zval *. This zval * should, when the function has completed its task, simply be returned unmodified. How do I accomplish this? I've tried something like this:
PHP_FUNCTION(my_func) {
zval *v;
if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &v) == FAILURE) {
WRONG_PARAM_COUNT;
}
.
.
.
return_value = v;
}
The above doesn't seem to be working at all though. Any ideas? I guess it is a really simple task once you known how do actually do it... :-)
Thankful for all help!
David Olsson