Thread (21 messages) flat view 21 messages, 3 authors, 2016-06-15

Re: [PATCH 01/10] parse-options: Don't call parse_options_check() so much

From: René Scharfe <hidden>
Date: 2016-06-15 22:50:11

Am 02.12.2010 00:28, schrieb Jonathan Nieder:
From: Stephen Boyd <redacted>

parse_options_check() is being called for each invocation of
parse_options_step() which can be quite a bit for some commands. The
commit introducing this function cb9d398 (parse-options: add
parse_options_check to validate option specs., 2009-06-09) had the
correct motivation and explicitly states that parse_options_check()
should be called from parse_options_start(). However, the implementation
differs from the motivation. Fix it.
Good idea.
 void parse_options_start(struct parse_opt_ctx_t *ctx,
 			 int argc, const char **argv, const char *prefix,
-			 int flags)
+			 int flags, const struct option *options)
It might be better to put options before flags, i.e. to use the same
order as in parse_options().

René
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help