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é