diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-02-13 12:14:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-13 12:14:53 +0100 |
commit | ce5a9bfe7e537c81d34bd4a27fc6638f20114e67 (patch) | |
tree | 1eeeedcb0370d7c156f60ee53017149c8aac8c28 /src/nvim/api/private/helpers.h | |
parent | 89135cff030b06f60cd596a9ae81cd9583987517 (diff) | |
parent | 1a3a8d903e9705ce41867e1cbc629a85c7cb6252 (diff) | |
download | rneovim-ce5a9bfe7e537c81d34bd4a27fc6638f20114e67.tar.gz rneovim-ce5a9bfe7e537c81d34bd4a27fc6638f20114e67.tar.bz2 rneovim-ce5a9bfe7e537c81d34bd4a27fc6638f20114e67.zip |
Merge pull request #27428 from bfredl/luarena
refactor(lua): use Arena when converting from lua stack to API args
Diffstat (limited to 'src/nvim/api/private/helpers.h')
-rw-r--r-- | src/nvim/api/private/helpers.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/api/private/helpers.h b/src/nvim/api/private/helpers.h index 9ee812f45c..11abb8f801 100644 --- a/src/nvim/api/private/helpers.h +++ b/src/nvim/api/private/helpers.h @@ -34,6 +34,7 @@ #define CSTR_TO_OBJ(s) STRING_OBJ(cstr_to_string(s)) #define CSTR_TO_ARENA_STR(arena, s) arena_string(arena, cstr_as_string(s)) #define CSTR_TO_ARENA_OBJ(arena, s) STRING_OBJ(CSTR_TO_ARENA_STR(arena, s)) +#define CBUF_TO_ARENA_STR(arena, s, len) arena_string(arena, cbuf_as_string((char *)(s), len)) #define BUFFER_OBJ(s) ((Object) { \ .type = kObjectTypeBuffer, \ @@ -119,6 +120,8 @@ #define api_init_array = ARRAY_DICT_INIT #define api_init_dictionary = ARRAY_DICT_INIT +#define KEYDICT_INIT { 0 } + #define api_free_boolean(value) #define api_free_integer(value) #define api_free_float(value) |