| 3 | #include <stdio.h> |
| 4 | |
| 5 | struct 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 | |
| 17 | bool json_escape_eq(const struct json_escape *a, const struct json_escape *b) |
| 18 | { |
no outgoing calls