summaryrefslogtreecommitdiff
path: root/lsp-json.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-02 14:10:38 -0500
committerpommicket <pommicket@gmail.com>2023-01-02 14:10:38 -0500
commitf791aa01fad7e81223808584212c6a1a4c80ca07 (patch)
treef93d53a62035cdad7f16b97fb28c83c7acfaf14f /lsp-json.c
parentc0d0117a963cf8e4dfb28b919087d8a8ecbbca6e (diff)
finish restructuring
Diffstat (limited to 'lsp-json.c')
-rw-r--r--lsp-json.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lsp-json.c b/lsp-json.c
index 4d5a2c7..94bb556 100644
--- a/lsp-json.c
+++ b/lsp-json.c
@@ -4,7 +4,8 @@
#define LSP_INTERNAL 1
#include "lsp.h"
-
+#include "util.h"
+#include "unicode.h"
#define SKIP_WHITESPACE while (json_is_space(text[index])) ++index;
@@ -587,8 +588,7 @@ void json_string_get(const JSON *json, JSONString string, char *buf, size_t buf_
*buf = '\0';
}
-// returns a malloc'd null-terminated string.
-static char *json_string_get_alloc(const JSON *json, JSONString string) {
+char *json_string_get_alloc(const JSON *json, JSONString string) {
u32 n = string.len + 1;
if (n == 0) --n; // extreme edge case
char *buf = calloc(1, n);