| 479 | } |
| 480 | |
| 481 | struct command_result *param_string_array(struct command *cmd, const char *name, |
| 482 | const char *buffer, const jsmntok_t *tok, |
| 483 | const char ***arr) |
| 484 | { |
| 485 | size_t i; |
| 486 | const jsmntok_t *s; |
| 487 | |
| 488 | if (tok->type != JSMN_ARRAY) |
| 489 | return command_fail_badparam(cmd, name, buffer, tok, |
| 490 | "should be an array"); |
| 491 | *arr = tal_arr(cmd, const char *, tok->size); |
| 492 | json_for_each_arr(i, s, tok) |
| 493 | (*arr)[i] = json_strdup(*arr, buffer, s); |
| 494 | return NULL; |
| 495 | } |
| 496 | |
| 497 | struct command_result *param_invstring(struct command *cmd, const char *name, |
| 498 | const char * buffer, const jsmntok_t *tok, |
nothing calls this directly
no test coverage detected