Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19391 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39178 invoked by uid 1010); 4 Oct 2005 12:14:38 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 39162 invoked from network); 4 Oct 2005 12:14:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Oct 2005 12:14:38 -0000 X-Host-Fingerprint: 212.32.183.87 87.183.32.ip.nordiq.net Received: from ([212.32.183.87:13661] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 4A/46-54476-C2272434 for ; Tue, 04 Oct 2005 08:14:36 -0400 Message-ID: <4A.46.54476.C2272434@pb1.pair.com> To: internals@lists.php.net Date: Tue, 04 Oct 2005 14:14:41 +0200 User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 212.32.183.87 Subject: zval "passthrough"? From: david.olsson@vimio.com (David Olsson) 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