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

From: Jakub Narębski <[email-masked]>
Date: Fri, 04 Apr 2014 13:09:05 +0200

W dniu 2014-03-27 19:50, David A. Dalrymple (and Bhushan G. Lodha) pisze:
> From: "Bhushan G. Lodha & David A. Dalrymple" <[email-masked]>
>
> 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?

> Signed-off-by: David Dalrymple (on zayin) <[email-masked]>
> ---
>   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;
> +};