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;
> +};