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

Function json_escape_string_

ccan/ccan/json_escape/json_escape.c:5–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include <stdio.h>
4
5struct json_escape *json_escape_string_(const tal_t *ctx,
6 const void *bytes, size_t len)
7{
8 struct json_escape *esc;
9
10 esc = (void *)tal_arr_label(ctx, char, len + 1,
11 TAL_LABEL(struct json_escape, ""));
12 memcpy(esc->s, bytes, len);
13 esc->s[len] = '\0';
14 return esc;
15}
16
17bool json_escape_eq(const struct json_escape *a, const struct json_escape *b)
18{

Callers 6

param_escaped_stringFunction · 0.85
param_labelFunction · 0.85
mainFunction · 0.85
rune_altern_from_jsonFunction · 0.85
rune_restr_from_jsonFunction · 0.85
db_col_json_escapeFunction · 0.85

Calls

no outgoing calls

Tested by 1

mainFunction · 0.68