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

Function json_to_int

common/json_parse.c:88–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88bool json_to_int(const char *buffer, const jsmntok_t *tok, int *num)
89{
90 s64 tmp;
91
92 if (!json_to_s64(buffer, tok, &tmp))
93 return false;
94 *num = tmp;
95
96 /* Just in case it doesn't fit. */
97 if (*num != tmp)
98 return false;
99
100 return true;
101}
102
103bool json_to_zero_or_one(const char *buffer, const jsmntok_t *tok, int *num)
104{

Callers 10

plugin_setconfig_doneFunction · 0.85
mainFunction · 0.85
handle_replyFunction · 0.85
chain_eventsFunction · 0.85
get_data_detailsFunction · 0.85
getroutes_done_errFunction · 0.85

Calls 1

json_to_s64Function · 0.50

Tested by 1

mainFunction · 0.68