aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/executor.h
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-12-25 14:38:26 +0100
committerbfredl <bjorn.linse@gmail.com>2022-02-26 14:01:38 +0100
commitacf38245d8961125f02d4c4168053e0d83dbc6df (patch)
tree8fcd347ccf609d8738c50c44b84c3cf59627921c /src/nvim/lua/executor.h
parentb87867e69e94d9784468a126f21c721446f080de (diff)
downloadrneovim-acf38245d8961125f02d4c4168053e0d83dbc6df.tar.gz
rneovim-acf38245d8961125f02d4c4168053e0d83dbc6df.tar.bz2
rneovim-acf38245d8961125f02d4c4168053e0d83dbc6df.zip
refactor(lua): use references directly on main thread
Diffstat (limited to 'src/nvim/lua/executor.h')
-rw-r--r--src/nvim/lua/executor.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/lua/executor.h b/src/nvim/lua/executor.h
index 6fca8e6c09..957c61f2f9 100644
--- a/src/nvim/lua/executor.h
+++ b/src/nvim/lua/executor.h
@@ -15,6 +15,15 @@
// Generated by msgpack-gen.lua
void nlua_add_api_functions(lua_State *lstate) REAL_FATTR_NONNULL_ALL;
+typedef struct {
+ LuaRef nil_ref;
+ LuaRef empty_dict_ref;
+ int ref_count;
+#if __has_feature(address_sanitizer)
+ PMap(handle_T) ref_markers;
+#endif
+} nlua_ref_state_t;
+
#define set_api_error(s, err) \
do { \
Error *err_ = (err); \
@@ -35,4 +44,7 @@ void nlua_add_api_functions(lua_State *lstate) REAL_FATTR_NONNULL_ALL;
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/executor.h.generated.h"
#endif
+
+EXTERN nlua_ref_state_t *nlua_global_refs INIT(= NULL);
+
#endif // NVIM_LUA_EXECUTOR_H