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

Function make_callback

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

Source from the content-addressed store, hash-verified

63}
64
65static struct command_result *make_callback(struct command *cmd,
66 struct param *def,
67 const char *buffer,
68 const jsmntok_t *tok)
69{
70 /* If it had a default, free that now to avoid leak */
71 if ((def->style == PARAM_OPTIONAL_WITH_DEFAULT
72 || def->style == PARAM_OPTIONAL_DEV_WITH_DEFAULT)
73 && !def->is_set)
74 tal_free(*(void **)def->arg);
75
76 def->is_set = true;
77
78 return def->cbx(cmd, def->name, buffer, tok, def->arg);
79}
80
81static struct command_result *post_check(struct command *cmd,
82 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