diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2019-01-27 07:35:26 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-27 16:28:18 -0800 |
commit | bf3ff338a25b7353ec6d39d31e14d081be9e3471 (patch) | |
tree | 125e179fe673c3b09cebbdeb105d7049ddd97498 /parse-options-cb.c | |
parent | f62470c650e0db9536f32b9e1ecbe7d25f759031 (diff) | |
download | git-bf3ff338a25b7353ec6d39d31e14d081be9e3471.tar.gz |
parse-options: stop abusing 'callback' for lowlevel callbacks
Lowlevel callbacks have different function signatures. Add a new field
in 'struct option' with the right type for lowlevel callbacks.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options-cb.c')
-rw-r--r-- | parse-options-cb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/parse-options-cb.c b/parse-options-cb.c index e2f3eaed07..e05bcea809 100644 --- a/parse-options-cb.c +++ b/parse-options-cb.c @@ -170,7 +170,8 @@ int parse_opt_noop_cb(const struct option *opt, const char *arg, int unset) * "-h" output even if it's not being handled directly by * parse_options(). */ -int parse_opt_unknown_cb(const struct option *opt, const char *arg, int unset) +int parse_opt_unknown_cb(struct parse_opt_ctx_t *ctx, + const struct option *opt, int unset) { return -2; } |