param: abstract 'struct command' so param doesn't need to access it.

I want to use param functions in plugins, and they don't have struct
command.

I had to use a special arg to param() for check to flag it as allowing
extra parameters, rather than adding a one-use accessor.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-12-08 11:09:25 +10:30
parent 061938068f
commit 3f16c9a665
7 changed files with 83 additions and 23 deletions

View File

@@ -38,8 +38,6 @@ struct command {
/* This is created if mode is CMD_USAGE */
const char *usage;
bool *ok;
/* Do not report unused parameters as errors (default false). */
bool allow_unused;
/* Have we started a json stream already? For debugging. */
bool have_json_stream;
};