Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48769 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79401 invoked from network); 14 Jun 2010 10:57:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jun 2010 10:57:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=cyberspice@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=cyberspice@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.158.45.55 as permitted sender) X-PHP-List-Original-Sender: cyberspice@php.net X-Host-Fingerprint: 85.158.45.55 elf.thecommune.org.uk Linux 2.4/2.6 Received: from [85.158.45.55] ([85.158.45.55:55633] helo=elf.thecommune.org.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BB/11-07295-CFA061C4 for ; Mon, 14 Jun 2010 06:57:02 -0400 Received: from localhost ([127.0.0.1] helo=[IPv6:::1] ident=1002) by elf.thecommune.org.uk with esmtp (Exim 4.42) id 1OO7UI-0000hN-8x for internals@lists.php.net; Mon, 14 Jun 2010 12:05:54 +0100 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1078) In-Reply-To: Date: Mon, 14 Jun 2010 11:56:57 +0100 Content-Transfer-Encoding: quoted-printable Message-ID: <6296D1E6-24DC-4A8E-892A-9EA6D08B0DC8@php.net> References: To: PHP internals X-Mailer: Apple Mail (2.1078) X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Rcpt-To: internals@lists.php.net X-SA-Exim-Mail-From: cyberspice@php.net X-SA-Exim-Scanned: No (on elf.thecommune.org.uk); SAEximRunCond expanded to false Subject: Re: [PHP-DEV] Different ways to collect an extension's functions. From: cyberspice@php.net (Melanie Rhianna Lewis) My feeling is that they should all be static consts unless explicitly = accessed outside of the object module or changed. Since typically = they're a list of function/method entries only accessed by a class or = zend_module_entry that is really the case. Without the static we're = polluting the name space. Melanie On 14 Jun 2010, at 11:38, Richard Quadling wrote: > Hi. >=20 > I'm looking into bug#52079 (missing lcfirst function from function = index). >=20 > The cause of the bug is that the genfunclist / genfuncindex scripts > haven't been run in a while. >=20 > Whilst running them and fixing a small issue with ereg =3D> preg, I > notice that in the results of genfunclist, there are 3 different ways > to collect an extensions functions ... >=20 > 1) The majority use const (79 in total). >=20 > # const zend_function_entry apache_functions[] =3D { > # const zend_function_entry apache_functions[] =3D { > # const zend_function_entry basic_functions[] =3D { > # const zend_function_entry bcmath_functions[] =3D { > # const zend_function_entry birdstep_functions[] =3D { > ... > # const zend_function_entry xsl_functions[] =3D { > # const zend_function_entry zend_funcs_aggregate[] =3D { > # const zend_function_entry zend_funcs_arrayaccess[] =3D { > # const zend_function_entry zend_funcs_iterator[] =3D { > # const zend_function_entry zend_funcs_serializable[] =3D { >=20 >=20 > 2) The following use static. >=20 > # static zend_function_entry disabled_function[] =3D { > # static zend_function_entry mysqlnd_functions[] =3D { > # static zend_function_entry php_sqlite3_class_methods[] =3D { > # static zend_function_entry php_sqlite3_result_class_methods[] =3D { > # static zend_function_entry php_sqlite3_stmt_class_methods[] =3D { > # static zend_function_entry spl_funcs_SplFixedArray[] =3D { >=20 >=20 > 3) The following don't use const or static. >=20 > # zend_function_entry enchant_functions[] =3D { > # zend_function_entry fileinfo_functions[] =3D { > # zend_function_entry intl_functions[] =3D { > # zend_function_entry litespeed_functions[] =3D { > # zend_function_entry phar_exception_methods[] =3D { > # zend_function_entry phar_functions[] =3D { > # zend_function_entry php_archive_methods[] =3D { > # zend_function_entry php_entry_methods[] =3D { > # zend_function_entry php_oci_functions[] =3D { >=20 >=20 > Regards, >=20 > Richard. >=20 > --=20 > ----- > Richard Quadling > "Standing on the shoulders of some very clever giants!" > EE : http://www.experts-exchange.com/M_248814.html > EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp > Zend Certified Engineer : = http://zend.com/zce.php?c=3DZEND002498&r=3D213474731 > ZOPA : http://uk.zopa.com/member/RQuadling >=20 > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20