Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19866 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87821 invoked by uid 1010); 1 Nov 2005 06:45:52 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 87805 invoked from network); 1 Nov 2005 06:45:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Nov 2005 06:45:52 -0000 X-Host-Fingerprint: 198.237.84.92 unknown Linux 2.4/2.6 Received: from ([198.237.84.92:1372] helo=bobsilva.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 5C/38-02082-D1F07634 for ; Tue, 01 Nov 2005 01:45:49 -0500 Received: from [198.237.84.93] (HELO jake) by bobsilva.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 676069 for internals@lists.php.net; Mon, 31 Oct 2005 19:26:29 -0800 To: Date: Mon, 31 Oct 2005 22:47:45 -0800 Message-ID: <002f01c5deb0$2a2e87b0$5d54edc6@jake> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0030_01C5DE6D.1C0B47B0" X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcXesCogGe3KqE5PReG7mAkCJHDz5A== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 Subject: Question on return_value From: me@bobsilva.com ("Bob Silva") ------=_NextPart_000_0030_01C5DE6D.1C0B47B0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, I have an internal function defined that returns an array zval: zval *pow_zstring_internal_split(Z_STRVAL_P(ivalue), separator, count, 0 TSRMLS_DC); When I call it like this, return_value is NULL in userland. return_value = pow_zstring_internal_split(Z_STRVAL_P(ivalue), separator, count, 0 TSRMLS_CC); But when I call it like this, it works as expected and an array is returned to userland array = pow_zstring_internal_split(Z_STRVAL_P(ivalue), separator, count, 0 TSRMLS_CC); *return_value = *array; I'm sure there is an obvious answer, but given my background (or lack thereof) in C, I can't figure it out. How does the temporary assignment change things inside the engine? Bob ------=_NextPart_000_0030_01C5DE6D.1C0B47B0--