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

[RFC] struct *_struct

From
Jared Hance <jaredhance@gmail.com>
Date
Aug 4, 2010, 15:08 UTC
Message-ID
<20100804150843.GA2762@localhost.localdomain>

After browsing some of the diff related code today, I noted the structure "struct diff_queue_struct". I found it somewhat odd that a struct had struct in the name of the struct, and I hadn't really seen any others like this.

Indeed, there are two others: struct dir_struct and struct cmd_struct.
To see, you can run:
    $ git grep _struct *.c *.h

Typing "struct *_struct" is rather verbose - We already have to prepend the "struct", so it is extremely clear that we are using a struct. Is there a reason that:

    - We are extremely verbose
    - We use this style in only 3 cases
Next: Junio C Hamano
Message 1 of 8 in “[RFC] struct *_struct”
  1. Jared HanceAug 4, 2010
  2. Junio C HamanoAug 4, 2010
  3. Refactor structures in the form of *_struct.Jared Hance, Aug 4, 2010
  4. Michael WittenAug 5, 2010
  5. Jared HanceAug 5, 2010
  6. Michael WittenAug 6, 2010
  7. Jared HanceAug 6, 2010
  8. Miles BaderAug 6, 2010

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.