diff options
author | pommicket <pommicket@gmail.com> | 2023-01-02 14:10:38 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-01-02 14:10:38 -0500 |
commit | f791aa01fad7e81223808584212c6a1a4c80ca07 (patch) | |
tree | f93d53a62035cdad7f16b97fb28c83c7acfaf14f /lsp-json.c | |
parent | c0d0117a963cf8e4dfb28b919087d8a8ecbbca6e (diff) |
finish restructuring
Diffstat (limited to 'lsp-json.c')
-rw-r--r-- | lsp-json.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |