Re: Different ways to collect an extension's functions.

From: Date: Mon, 14 Jun 2010 14:01:38 +0000
Subject: Re: Different ways to collect an extension's functions.
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-48775@lists.php.net to get a copy of this message
2010/6/14 Melanie Rhianna Lewis <cyberspice@php.net>: > 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. Right, "const" is not similar to "static const"! +1 for static consts for all of them Patrick > Melanie > > > On 14 Jun 2010, at 12:28, Gustavo Lopes wrote: > >> On Mon, 14 Jun 2010 11:56:57 +0100, Melanie Rhianna Lewis >> <cyberspice@php.net> wrote: >> >>> 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. >>> >> >> The static keyword is unnecessary, const already makes the variable have internal linkage >> by default. >> >> -- >> Gustavo Lopes >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.internals (#48775) next »