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

Re: [PATCH] fmt-merge-msg: avoid leaking strbuf in shortlog()

From
Jeff King <peff@peff.net>
Date
Dec 20, 2017, 13:05 UTC
Message-ID
<20171220130501.GC17569@sigill.intra.peff.net>
In-Reply-To
<f79ae9a3-de47-c41e-fea6-6a0fedf4ef63@web.de>
On Tue, Dec 19, 2017 at 07:26:06PM +0100, René Scharfe wrote:
> > That's the same duality we have now with string_list.
> 
> Hmm, I thought we *were* discussing string_list?

Right, I guess what I was wondering is if a wrapper over string_list really ends up any better than having the dual-natured string_list.

If they both use the same struct, then your wrappers are all just functions. And isn't that more or less what we have now?

If they're actually different structs, then that complicates call signatures for functions that take a list (unless we are getting into polymorphism, they need to specify one of the types, even if they don't particularly care whether it's an allocated list or not).

-Peff
Previous: René ScharfeNext: Jeff King
Message 15 of 16 in “fmt-merge-msg: avoid leaking strbuf in shortlog()”
  1. fmt-merge-msg: avoid leaking strbuf in shortlog()René Scharfe, Dec 7, 2017
  2. Jeff KingDec 7, 2017
  3. René ScharfeDec 8, 2017
  4. Junio C HamanoDec 8, 2017
  5. René ScharfeDec 8, 2017
  6. Jeff KingDec 8, 2017
  7. Junio C HamanoDec 7, 2017
  8. Jeff KingDec 8, 2017
  9. René ScharfeDec 8, 2017
  10. Junio C HamanoDec 8, 2017
  11. Jeff KingDec 8, 2017
  12. René ScharfeDec 18, 2017
  13. Jeff KingDec 19, 2017
  14. René ScharfeDec 19, 2017
  15. Jeff KingDec 20, 2017
  16. Jeff KingDec 8, 2017

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.