Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:2904 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4556 invoked from network); 27 Jun 2003 18:33:58 -0000 Received: from unknown (HELO localhost.localdomain) (65.198.110.7) by pb1.pair.com with SMTP; 27 Jun 2003 18:33:58 -0000 Received: (from andrei@localhost) by localhost.localdomain (8.11.6/8.11.6) id h5RIX2H30741; Fri, 27 Jun 2003 14:33:02 -0400 X-Authentication-Warning: localhost.localdomain: andrei set sender to andrei@gravitonic.com using -f Date: Fri, 27 Jun 2003 14:33:01 -0400 To: fuhs@purdue.edu Cc: internals@lists.php.net Message-ID: <20030627183258.GA30715@hyperion.gravitonic.com> Mail-Followup-To: Andrei Zmievski , fuhs@purdue.edu, internals@lists.php.net References: <1056737912.3efc8a7881a32@webmail.purdue.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1056737912.3efc8a7881a32@webmail.purdue.edu> User-Agent: Mutt/1.4.1i Subject: Re: [PHP-DEV] [PATCH] extend zend_parse_parameters() functionality (2nd attempt) From: andrei@gravitonic.com (Andrei Zmievski) On Fri, 27 Jun 2003, fuhs@purdue.edu wrote: > I propose that a new type, 'Z', be added in order to allow the extension coders > access to the zval** which was available with the now deprecated > zend_get_parameters(). > > I came to this conclusion after tracing some segfaults to a section of code > similar to this: > > zval *zend_value; > if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &zend_value) == > FAILURE) > return; > > convert_to_array_ex(&zend_value); > > I realized after sifting through the Zend code that the proper handling of zval* > types is just as important as that of the zval's. This modification will > give extension programmers access to legitimate zval*'s and their corresponding > zval. If you want zval**'s, use zend_get_parameters(). -Andrei "The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka!" but "That's funny..." -- Isaac Asimov.