parse-options: const parse_options_concat() parameters
Document the fact that the function doesn't modify the two option arrays passed to it by adding the keyword const to each parameter. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
f904f9025f
commit
c84078573e
@ -181,7 +181,8 @@ struct option *parse_options_dup(const struct option *o)
|
|||||||
return opts;
|
return opts;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct option *parse_options_concat(struct option *a, struct option *b)
|
struct option *parse_options_concat(const struct option *a,
|
||||||
|
const struct option *b)
|
||||||
{
|
{
|
||||||
struct option *ret;
|
struct option *ret;
|
||||||
size_t a_len = parse_options_count(a);
|
size_t a_len = parse_options_count(a);
|
||||||
|
@ -281,7 +281,7 @@ int parse_options_step(struct parse_opt_ctx_t *ctx,
|
|||||||
int parse_options_end(struct parse_opt_ctx_t *ctx);
|
int parse_options_end(struct parse_opt_ctx_t *ctx);
|
||||||
|
|
||||||
struct option *parse_options_dup(const struct option *a);
|
struct option *parse_options_dup(const struct option *a);
|
||||||
struct option *parse_options_concat(struct option *a, struct option *b);
|
struct option *parse_options_concat(const struct option *a, const struct option *b);
|
||||||
|
|
||||||
/*----- some often used options -----*/
|
/*----- some often used options -----*/
|
||||||
int parse_opt_abbrev_cb(const struct option *, const char *, int);
|
int parse_opt_abbrev_cb(const struct option *, const char *, int);
|
||||||
|
Loading…
Reference in New Issue
Block a user