diff options
author | Lewis Russell <lewis6991@gmail.com> | 2022-11-14 18:04:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-14 18:04:36 +0000 |
commit | f8c671827710c6e9cca3bfd60c32098b2be8239a (patch) | |
tree | a5d949663a1b061ca82ecd89bb90f083f9a2bbb8 /src/nvim/api/buffer.h | |
parent | 30604320072335122aea0f37890f136b2ba0e445 (diff) | |
download | rneovim-f8c671827710c6e9cca3bfd60c32098b2be8239a.tar.gz rneovim-f8c671827710c6e9cca3bfd60c32098b2be8239a.tar.bz2 rneovim-f8c671827710c6e9cca3bfd60c32098b2be8239a.zip |
feat(lua-api): avoid unnecessary allocations (#19877)
Lua makes (or reuses) an internal copy of strings, so we can safely push
buf pointers onto the stack.
Diffstat (limited to 'src/nvim/api/buffer.h')
-rw-r--r-- | src/nvim/api/buffer.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/api/buffer.h b/src/nvim/api/buffer.h index 1c4a93a587..0814da63cd 100644 --- a/src/nvim/api/buffer.h +++ b/src/nvim/api/buffer.h @@ -1,7 +1,10 @@ #ifndef NVIM_API_BUFFER_H #define NVIM_API_BUFFER_H +#include <lauxlib.h> + #include "nvim/api/private/defs.h" +#include "nvim/buffer_defs.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "api/buffer.h.generated.h" |