emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] trunk r117286: Fix last commit.


From: Stefan Monnier
Subject: Re: [Emacs-diffs] trunk r117286: Fix last commit.
Date: Mon, 09 Jun 2014 12:19:42 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

>>> I wish people could refrain from playing around with the
>>> >static/extern declarations.
>> I didn't.  I just fixed something that was already there.

This was not directed at you in particular, indeed.

> I think Stefan was referring to the practice of marking symbols as
> static if they're not used in other modules.

Right.

> Generally speaking this is good practice, as non-expert readers of the
> code needn't consider whether a static symbol might be used by another
> module.  It can help GCC in the same way.

Yes, but for things which are conceptually global (e.g. all the Qfoo
thingies, which by convention share namespace with Elisp's), the fact
they are currently only accessed from a single file doesn't mean it will
(or even should) stay that way, and adding "static" when that changes is
pointless (and just means we'll have to remove that "static" next time
it changes).

> However, I take Stefan's point that the practice gets messy when dealing
> with functions that can be static on typical GNU/Linux builds but must be
> extern on other ports.  So I installed trunk bzr 117290 to make these
> symbols extern.

Yes, that's better.


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]