Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48774 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24544 invoked from network); 14 Jun 2010 13:32:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jun 2010 13:32:29 -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:56671] helo=elf.thecommune.org.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 66/2A-07295-C6F261C4 for ; Mon, 14 Jun 2010 09:32:29 -0400 Received: from localhost ([127.0.0.1] helo=[IPv6:::1] ident=1002) by elf.thecommune.org.uk with esmtp (Exim 4.42) id 1OO9uk-0000yr-Fz for internals@lists.php.net; Mon, 14 Jun 2010 14:41:22 +0100 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1078) In-Reply-To: Date: Mon, 14 Jun 2010 14:32:25 +0100 Content-Transfer-Encoding: quoted-printable Message-ID: <514DC7EC-9D36-4FE9-BDF4-B6CA13DA274B@php.net> References: <6296D1E6-24DC-4A8E-892A-9EA6D08B0DC8@php.net> 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) I know the ANSI C standard pretty well but I don't remember that at all = so rather than just accepting it I checked it on my Mac using a small = example. Compiler details are below: kring:Development melanie$ gcc --version i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5657) In my example static const did have internal linkage, const on its own = in the global scope did not. You still need static. Melanie On 14 Jun 2010, at 12:28, Gustavo Lopes wrote: > On Mon, 14 Jun 2010 11:56:57 +0100, Melanie Rhianna Lewis > wrote: >=20 >> 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. >>=20 >=20 > The static keyword is unnecessary, const already makes the variable = have internal linkage by default. >=20 > --=20 > Gustavo Lopes >=20 > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20