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

Function json_dup_contents

common/json_parse.c:678–686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

676}
677
678void json_dup_contents(const tal_t *ctx,
679 const char *buffer,
680 const jsmntok_t *tok,
681 const char **new_buffer,
682 const jsmntok_t **new_toks)
683{
684 *new_buffer = tal_dup_arr(ctx, char, buffer, tok->end, 0);
685 *new_toks = tal_dup_arr(ctx, jsmntok_t, tok, json_next(tok) - tok, 0);
686}

Callers 3

parse_requestFunction · 0.85
read_sync_rpc_replyFunction · 0.85

Calls 1

json_nextFunction · 0.50

Tested by

no test coverage detected