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