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

Function make_callback

common/json_param.c:53–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53static struct command_result *make_callback(struct command *cmd,
54 struct param *def,
55 const char *buffer,
56 const jsmntok_t *tok)
57{
58 /* If it had a default, free that now to avoid leak */
59 if (def->style == PARAM_OPTIONAL_WITH_DEFAULT && !def->is_set)
60 tal_free(*(void **)def->arg);
61
62 def->is_set = true;
63
64 return def->cbx(cmd, def->name, buffer, tok, def->arg);
65}
66
67static struct command_result *post_check(struct command *cmd,
68 struct param *params)

Callers 2

parse_by_positionFunction · 0.85
parse_by_nameFunction · 0.85

Calls 1

tal_freeFunction · 0.85

Tested by

no test coverage detected