MCPcopy Create free account
hub / github.com/ElementsProject/lightning / param_string_array

Function param_string_array

common/json_param.c:481–495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479}
480
481struct 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
497struct command_result *param_invstring(struct command *cmd, const char *name,
498 const char * buffer, const jsmntok_t *tok,

Callers

nothing calls this directly

Calls 2

command_fail_badparamFunction · 0.70
json_strdupFunction · 0.50

Tested by

no test coverage detected