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

Re: [PATCH 2/2] make the ST_{C,M}TIME_NSEC macros more function like

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 15, 2009, 20:01 UTC
Message-ID
<7v4oxu7dyn.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<0681248ac5c9cedf5f42adeeae89966a89e6d42a.1237115791.git.barvik@broadpark.no>
Kjetil Barvik <barvik@broadpark.no> writes:
Show 5 quoted lines
> Make the macros take a pointer to a 'struct stat'. This is so that it
> should be easier to understand what is going on, and that the macros
> can later be implemented as a inline function if we want to.
>
> Impact: cosmetic change
Hmm,...
I have to wonder if this cosmetic change is an improvement, though.

I do not have a strong feeling either way, but I think it makes it clear that these two macros are not lvalues if you do not pass a pointer but instead pass a structure. An inline function can still take a structure passed by value as an argument anyway, no?

Previous: Kjetil BarvikNext: Kjetil Barvik
Message 4 of 13 in “git checkout: one bugfix and one cosmetic change”
  1. 0/2 git checkout: one bugfix and one cosmetic changeKjetil Barvik, Mar 15, 2009
  2. 1/2 checkout bugfix: use stat.mtime instead of stat.ctime in two placesKjetil Barvik, Mar 15, 2009
  3. 2/2 make the ST_{C,M}TIME_NSEC macros more function likeKjetil Barvik, Mar 15, 2009
  4. Junio C HamanoMar 15, 2009
  5. Kjetil BarvikMar 15, 2009
  6. Junio C HamanoMar 16, 2009
  7. Kjetil BarvikMar 17, 2009
  8. Junio C HamanoMar 15, 2009
  9. Junio C HamanoMar 15, 2009
  10. Michael J GruberMar 16, 2009
  11. Kris ShannonMar 17, 2009
  12. Jeff KingMar 17, 2009
  13. Michael J GruberMar 17, 2009

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.