git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] Make fetch-pack a builtin with an internal API

From
FWFlorian Weimer <fw@deneb.enyo.de>
Date
Jul 9, 2007, 15:10 UTC
Message-ID
<874pkdlij7.fsf@mid.deneb.enyo.de>
In-Reply-To
<20070709144030.GE16032@thunk.org>
* Theodore Tso:
> On Mon, Jul 09, 2007 at 02:16:35PM +0100, Andy Parkins wrote:
Show 14 quoted lines
>> Perhaps I'm reading it wrong but:
>> 
>> "All identifiers beginning with an underscore are reserved for ordinary 
>> identifiers (functions, variables, typedefs, enumeration constants) with file 
>                                                                       ^^^^^^^^^
>> scope."
>   ^^^^^^
>> 
>> Doesn't agree with what you've said.  I think that you _can_ use _[a-z]* for 
>> labels or structure members - however, not within file or function scope.
>
> I think the above does agree with what I said.  It says that you can
> use functions, variables, typdefs, enumeration constants (not just
> labels or structure members) WITH FILE SCOPE.
No, they are are reserved.
Show 5 quoted lines
> I.e., so long as it doesn't leak across a .o linkage.  So one .o
> file can use a static _my_strdup, and another .o file can use a
> static _my_strdup, and they don't have to worry about multiply
> defined function conflicts, since they are static functions with
> file or smaller scoping.

This is not sufficient because the implementation might have a *typedef* for _my_strdup in any header file, and neither translation unit would compile. Or they could have been declared with a different prototype.

Previous: Theodore TsoNext: Andy Parkins
Message 9 of 10 in “Make fetch-pack a builtin with an internal API”
  1. Make fetch-pack a builtin with an internal APIDaniel Barkalow, Jul 9, 2007
  2. Junio C HamanoJul 9, 2007
  3. Daniel BarkalowJul 9, 2007
  4. René ScharfeJul 9, 2007
  5. Daniel BarkalowJul 9, 2007
  6. Theodore TsoJul 9, 2007
  7. Andy ParkinsJul 9, 2007
  8. Theodore TsoJul 9, 2007
  9. Florian WeimerJul 9, 2007
  10. Andy ParkinsJul 9, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.