Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:4714 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26310 invoked by uid 1010); 7 Oct 2003 08:40:14 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 26286 invoked from network); 7 Oct 2003 08:40:14 -0000 Received: from unknown (HELO mail.sites-secure.com) (213.189.34.71) by pb1.pair.com with SMTP; 7 Oct 2003 08:40:14 -0000 Received: by mail.sites-secure.com (CommuniGate Pro PIPE 3.5.9) with PIPE id 31175012; Tue, 07 Oct 2003 09:47:09 +0200 Received: from [192.117.106.24] (account ilya@up.co.il HELO abox.co.il) by mail.sites-secure.com (CommuniGate Pro SMTP 3.5.9) with ESMTP id 31175003 for internals@lists.php.net; Tue, 07 Oct 2003 09:46:59 +0200 Message-ID: <3F827CC1.5070405@abox.co.il> Date: Tue, 07 Oct 2003 10:43:45 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3; MultiZilla v1.3.1 (a)) Gecko/20030917 X-Accept-Language: en-us, en, he, ru MIME-Version: 1.0 To: PHP Development Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-DoalSignature: rot-2 (smtp) Subject: help request: passing return value From: netcat@abox.co.il (netcat) Hi internals. [background] I'm newbie here and with php extensions. Working on php extension. It should give access to librep. I have very little experience with C. [problem] zval f1(some_args) { zval r; ... return r; } /* f1 can return many different types */ ZEND_FUNCTION(f2) { /* working on some_args here */ ... ... /* here i need to return what f1(some_args) returns */ } What's the best way to pass the result ? Any macro that would ? [tried] To look at another modules. Make f1 be (zval *) and "*return_value=*rep_data_converter(result);" in f2. Since zval is not very simple structure - it doesn't work. P.S. Posting this message to php.internals seems to fail. -- NetCat --------------------------------------------------- FREE 10MB Email + AntiSpam + POP3 + more. Get it at http://www.doal.co.il:81/free/?c=antispam