Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71816 invoked from network); 19 Mar 2003 20:24:07 -0000 Received: from unknown (HELO marco.bezeqint.net) (192.115.106.37) by pb1.pair.com with SMTP; 19 Mar 2003 20:24:07 -0000 Received: from mr1.bezeqint.net (pip-17.bezeqint.net [192.115.106.17]) by marco.bezeqint.net (Bezeq International SMTP out Mail Server) with ESMTP id 558C16833 for ; Wed, 19 Mar 2003 22:22:23 +0200 (IST) Received: from mail.zend.com (bzq-117-235-230.cust.bezeqint.net [192.117.235.230]) by mr1.bezeqint.net (Mirapoint Messaging Server MOS 3.3.2-CR) with SMTP id AUR83179; Wed, 19 Mar 2003 22:24:05 +0200 (IST) Received: (qmail 1569 invoked from network); 19 Mar 2003 20:24:04 -0000 Received: from localhost (HELO andi-laptop.zend.com) (127.0.0.1) by localhost with SMTP; 19 Mar 2003 20:24:04 -0000 Message-ID: <5.1.0.14.2.20030319222452.032ace98@127.0.0.1> X-Sender: andi@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Wed, 19 Mar 2003 22:25:20 +0200 To: Andrei Zmievski , PHP Internals In-Reply-To: <20030318215420.GA8409@hyperion.gravitonic.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] function registration patch From: andi@zend.com (Andi Gutmans) References: <20030318215420.GA8409@hyperion.gravitonic.com> If the memory manager is usable at this point (I think it is) then you should use do_alloca() and free_alloca() instead of malloc()/free(). Andi At 04:54 PM 3/18/2003 -0500, Andrei Zmievski wrote: >Currently when registering functions, the unmodified function name is >used as the key for the function table. This leads to problems when an >extension class has a constructor that is not all lowercased. For >example: > >function_entry php_gtk_button_functions[] = { > PHP_FE("GtkButton", NULL), > ... >}; > >Then when using something like: > > ... > parent::GtkButton(); > ... > >It fails because it uses 'gtkbutton' as the key to search the function >table. The attached patch fixes that by lowercasing the key (function >name) when registering functions. > >I know that some may say, "just use lowercase class name for the >constructor in the function entry list", but that messes with nice >class/function names again. > >-Andrei http://www.gravitonic.com/ >* It said 'Winmodem' on the box, but I still feel like I lost. * > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php