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

Re: [PATCH 03/10] diffcore-pickaxe.c: Refactor pickaxe_fn signature

From
Jakub Narębski <jnareb@gmail.com>
Date
Apr 4, 2014, 11:09 UTC
Message-ID
<533E92D1.9020406@gmail.com>
In-Reply-To
<6822f9d947ffb589df25537e2c1e7c4ead7656b0.1395942768.git.davidad@alum.mit.edu>
W dniu 2014-03-27 19:50, David A. Dalrymple (and Bhushan G. Lodha) pisze:
Show 9 quoted lines
> From: "Bhushan G. Lodha & David A. Dalrymple" <dad-bgl@mit.edu>
>
> This function type previously accepted separate regex_t and kwset_t
> parameters, which conceptually go together. Here we create a struct to
> encapsulate them, in anticipation of adding a third field that
> pickaxe_fn's may require.
>
> This parallels the existing diffgrep_cb structure for passing possibly
> relevant values through to the callbacks invoked by xdi_diff_outf.

If it parallels existing diffgrep_cb structure, why not name this equivalent in simular way, i.e. pickaxe_cb or pickaxe_options or pickaxe_cb_opts instead of generic name fn_options?

Show 17 quoted lines
> Signed-off-by: David Dalrymple (on zayin) <davidad@alum.mit.edu>
> ---
>   diffcore-pickaxe.c | 50 ++++++++++++++++++++++++++++++--------------------
>   1 file changed, 30 insertions(+), 20 deletions(-)
>
> diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c
> index 0d36a3c..7e65095 100644
> --- a/diffcore-pickaxe.c
> +++ b/diffcore-pickaxe.c
> @@ -8,17 +8,22 @@
>   #include "xdiff-interface.h"
>   #include "kwset.h"
>
> +struct fn_options {
> +	regex_t *regex;
> +	kwset_t kws;
> +};
Previous: David A. Dalrymple (and Bhushan G. Lodha)Next: David A. Dalrymple (and Bhushan G. Lodha)
Message 5 of 23 in “[RFC] pickaxe for function names”
  1. 00/10 [RFC] pickaxe for function namesDavid A. Dalrymple (and Bhushan G. Lodha), Mar 27, 2014
  2. 01/10 .gitattributes: specify the language usedDavid A. Dalrymple (and Bhushan G. Lodha), Mar 27, 2014
  3. 02/10 diffcore-pickaxe.c: refactor regex compilationDavid A. Dalrymple (and Bhushan G. Lodha), Mar 27, 2014
  4. 03/10 diffcore-pickaxe.c: Refactor pickaxe_fn signatureDavid A. Dalrymple (and Bhushan G. Lodha), Mar 27, 2014
  5. Jakub NarębskiApr 4, 2014
  6. 04/10 diff.c/diff.h: expose userdiff_funcnameDavid A. Dalrymple (and Bhushan G. Lodha), Mar 27, 2014
  7. 05/10 diffcore-pickaxe.c: set up funcname patternDavid A. Dalrymple (and Bhushan G. Lodha), Mar 27, 2014
  8. 06/10 log: --function-name pickaxeDavid A. Dalrymple (and Bhushan G. Lodha), Mar 27, 2014
  9. René ScharfeApr 3, 2014
  10. Junio C HamanoApr 3, 2014
  11. Jakub NarębskiApr 4, 2014
  12. Junio C HamanoApr 4, 2014
  13. Bhushan LodhaApr 28, 2014
  14. 07/10 xdiff: add XDL_EMIT_MOREFUNCNAMESDavid A. Dalrymple (and Bhushan G. Lodha), Mar 27, 2014
  15. 08/10 xdiff: add XDL_EMIT_MOREHUNKHEADSDavid A. Dalrymple (and Bhushan G. Lodha), Mar 27, 2014
  16. 09/10 t4213: test --function-name optionDavid A. Dalrymple (and Bhushan G. Lodha), Mar 27, 2014
  17. Johannes SixtMar 28, 2014
  18. Eric SunshineMar 28, 2014
  19. Johannes SixtMar 28, 2014
  20. Jakub NarębskiApr 4, 2014
  21. 10/10 Documentation: Document --function-name usageDavid A. Dalrymple (and Bhushan G. Lodha), Mar 27, 2014
  22. Eric SunshineMar 28, 2014
  23. Jeff KingMar 27, 2014

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.