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

Re: [PATCH 0/5] xdiff: replace emit_func() with type-safe

From
Thomas Rast <trast@student.ethz.ch>
Date
May 18, 2012, 08:28 UTC
Message-ID
<87aa15hp0e.fsf@thomas.inf.ethz.ch>
In-Reply-To
<4FAAD13E.8030806@lsrfire.ath.cx>
René Scharfe <rene.scharfe@lsrfire.ath.cx> writes:
Show 15 quoted lines
> Commit ef2e62fe added the ability to bypass the creation of textual diffs
> and to access diff data directly, through the added emit_func member of
> xdemitconf_t.  This function pointer has a type of "void (*)()", because
> "int (*)(xdfenv_t *, xdchange_t *, xdemitcb_t *, xdemitconf_t const *)"
> (its real type) would be difficult to export due to the many internal
> types in that signature.
>
> This feature is currently used twice in git blame, through the function
> xdi_diff_hunks().  Both cases only need to know which lines are affected
> by the different hunks of a diff, i.e. the numbers shown in hunk headers
> of unified diffs.
>
> This patch series adds a simpler mechanism to accommodate these two
> callers, in a type-safe way, without exporting too many internal types
> of libxdiff.  The last patch removes the old functions.

Cool, thanks a lot, this will come in handy when I finally get around to finishing log -L.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: René Scharfe
Message 7 of 7 in “xdiff: replace emit_func() with type-safe”
  1. 0/5 xdiff: replace emit_func() with type-safeRené Scharfe, May 9, 2012
  2. 1/5 xdiff: add hunk_func()René Scharfe, May 9, 2012
  3. 2/5 blame: use hunk_func(), part 1René Scharfe, May 9, 2012
  4. 3/5 blame: use hunk_func(), part 2René Scharfe, May 9, 2012
  5. 4/5 blame: factor out helper for calling xdi_diff()René Scharfe, May 9, 2012
  6. 5/5 xdiff: remove emit_func() and xdi_diff_hunks()René Scharfe, May 9, 2012
  7. Thomas RastMay 18, 2012

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.