param: upgraded json_tok_escaped_string

Signed-off-by: Mark Beckwith <wythe@intrig.com>
This commit is contained in:
Mark Beckwith
2018-08-29 15:44:04 -05:00
committed by Rusty Russell
parent 8590dbedfb
commit aa60057134
6 changed files with 34 additions and 52 deletions

View File

@@ -13,9 +13,9 @@ struct json_escaped *json_escaped_string_(const tal_t *ctx,
return esc;
}
struct json_escaped *json_tok_escaped_string(const tal_t *ctx,
const char *buffer,
const jsmntok_t *tok)
struct json_escaped *json_to_escaped_string(const tal_t *ctx,
const char *buffer,
const jsmntok_t *tok)
{
if (tok->type != JSMN_STRING)
return NULL;

View File

@@ -17,9 +17,9 @@ struct json_escaped *json_partial_escape(const tal_t *ctx,
const char *str TAKES);
/* Extract a JSON-escaped string. */
struct json_escaped *json_tok_escaped_string(const tal_t *ctx,
const char *buffer,
const jsmntok_t *tok);
struct json_escaped *json_to_escaped_string(const tal_t *ctx,
const char *buffer,
const jsmntok_t *tok);
/* Are two escaped json strings identical? */
bool json_escaped_eq(const struct json_escaped *a,