Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43077 invoked from network); 18 Mar 2003 21:57:02 -0000 Received: from unknown (HELO jdi.jdimedia.nl) (212.204.192.51) by pb1.pair.com with SMTP; 18 Mar 2003 21:57:02 -0000 Received: from jdi.jdimedia.nl (jdi.jdimedia.nl [212.204.192.51]) by jdi.jdimedia.nl (8.12.4/8.12.4) with ESMTP id h2ILv1jw028587; Tue, 18 Mar 2003 22:57:01 +0100 Date: Tue, 18 Mar 2003 22:57:01 +0100 (CET) X-X-Sender: derick@jdi.jdimedia.nl To: Andrei Zmievski cc: PHP Internals In-Reply-To: <20030318215420.GA8409@hyperion.gravitonic.com> Message-ID: References: <20030318215420.GA8409@hyperion.gravitonic.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] function registration patch From: derick@php.net (Derick Rethans) On Tue, 18 Mar 2003, 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. Maybe we can finally fix the OO model and just make them case-sensitive? :) If that's not an option, I think the patch is OK. Derick -- "my other box is your windows PC" ------------------------------------------------------------------------- Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ -------------------------------------------------------------------------