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

Re: [PATCH 2/3] rev-list: remove last static vars used in "show_commit"

From
Christian Couder <chriscool@tuxfamily.org>
Date
Apr 9, 2009, 03:11 UTC
Message-ID
<200904090511.08242.chriscool@tuxfamily.org>
In-Reply-To
<49DC54DC.3060408@gnu.org>
Le mercredi 8 avril 2009, Paolo Bonzini a écrit :
Show 9 quoted lines
> >  	struct rev_info revs;
> > +	struct rev_list_info info;
> >  	int reaches = 0, all = 0;
> >
> > +	memset(&info, 0, sizeof(info));
> > +	info.revs = &revs;
>
> Would it make sense to embed the struct rev_info entirely in the new
> struct, without going through a pointer?
Perhaps, I will have a look.

The downside is that the struct rev_info may be initialized twice if we still use "memset(&info, 0, sizeof(info))" as it is also initialized in "init_revisions".

Thanks, Christian.

Previous: Paolo BonziniNext: Junio C Hamano
Message 5 of 8 in “list-objects: add "void *data" parameter to show functions”
  1. 1/3 list-objects: add "void *data" parameter to show functionsChristian Couder, Apr 6, 2009
  2. 2/3 rev-list: remove last static vars used in "show_commit"Christian Couder, Apr 6, 2009
  3. 3/3 rev-list: add "int bisect_show_flags" in "struct rev_list_info"Christian Couder, Apr 7, 2009
  4. Paolo BonziniApr 8, 2009
  5. Christian CouderApr 9, 2009
  6. Junio C HamanoApr 8, 2009
  7. Christian CouderApr 8, 2009
  8. Junio C HamanoApr 8, 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.