mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 23:54:22 +01:00
param: added json_tok_string
Signed-off-by: Mark Beckwith <wythe@intrig.com>
This commit is contained in:
committed by
Rusty Russell
parent
0b26a17a0f
commit
47510a8e74
@@ -159,6 +159,15 @@ bool json_tok_escaped_string(struct command *cmd, const char *name,
|
||||
return false;
|
||||
}
|
||||
|
||||
bool json_tok_string(struct command *cmd, const char *name,
|
||||
const char * buffer, const jsmntok_t *tok,
|
||||
const char **str)
|
||||
{
|
||||
*str = tal_strndup(cmd, buffer + tok->start,
|
||||
tok->end - tok->start);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool json_tok_label(struct command *cmd, const char *name,
|
||||
const char * buffer, const jsmntok_t *tok,
|
||||
struct json_escaped **label)
|
||||
|
||||
Reference in New Issue
Block a user