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

Function json_scanv

common/json_parse.c:465–486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

463}
464
465const char *json_scanv(const tal_t *ctx,
466 const char *buffer,
467 const jsmntok_t *tok,
468 const char *guide,
469 va_list ap)
470{
471 va_list cpy;
472 const char *orig_guide = guide, *errmsg;
473
474 /* We need this, since &ap doesn't work on some platforms... */
475 va_copy(cpy, ap);
476 errmsg = parse_guide(buffer, tok, &guide, &cpy);
477 va_end(cpy);
478
479 if (errmsg) {
480 return tal_fmt(ctx, "Parsing '%.*s': %s",
481 (int)(guide - orig_guide), orig_guide,
482 errmsg);
483 }
484 assert(guide[0] == '\0');
485 return NULL;
486}
487
488const char *json_scan(const tal_t *ctx,
489 const char *buffer,

Callers 1

json_scanFunction · 0.70

Calls 1

parse_guideFunction · 0.85

Tested by

no test coverage detected