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

Function json_to_number

common/json_parse.c:92–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92bool json_to_number(const char *buffer, const jsmntok_t *tok,
93 unsigned int *num)
94{
95 uint64_t u64;
96
97 if (!json_to_u64(buffer, tok, &u64))
98 return false;
99 *num = u64;
100
101 /* Just in case it doesn't fit. */
102 if (*num != u64)
103 return false;
104 return true;
105}
106
107bool json_to_u16(const char *buffer, const jsmntok_t *tok,
108 short unsigned int *num)

Callers 3

param_numberFunction · 0.70
test_query_channel_rangeFunction · 0.50
test_reply_channel_rangeFunction · 0.50

Calls 1

json_to_u64Function · 0.70

Tested by 2

test_query_channel_rangeFunction · 0.40
test_reply_channel_rangeFunction · 0.40