executor.h
Go to the documentation of this file.
1 #ifndef NVIM_LUA_EXECUTOR_H
2 #define NVIM_LUA_EXECUTOR_H
3 
4 #include <lauxlib.h>
5 #include <lua.h>
6 
8 #include "nvim/eval/typval.h"
9 #include "nvim/ex_cmds_defs.h"
10 #include "nvim/func_attr.h"
11 #include "nvim/lua/converter.h"
12 
13 // Generated by msgpack-gen.lua
14 void nlua_add_api_functions(lua_State *lstate) REAL_FATTR_NONNULL_ALL;
15 
16 EXTERN LuaRef nlua_nil_ref INIT(= LUA_NOREF);
17 EXTERN LuaRef nlua_empty_dict_ref INIT(= LUA_NOREF);
18 
19 EXTERN int nlua_refcount INIT(= 0);
20 
21 #define set_api_error(s, err) \
22  do { \
23  Error *err_ = (err); \
24  err_->type = kErrorTypeException; \
25  err_->set = true; \
26  memcpy(&err_->msg[0], s, sizeof(s)); \
27  } while (0)
28 
29 #define NLUA_CLEAR_REF(x) \
30  do { \
31  /* Take the address to avoid double evaluation. #1375 */ \
32  if ((x) != LUA_NOREF) { \
33  api_free_luaref(x); \
34  (x) = LUA_NOREF; \
35  } \
36  } while (0)
37 
38 #ifdef INCLUDE_GENERATED_DECLARATIONS
39 # include "lua/executor.h.generated.h"
40 #endif
41 #endif // NVIM_LUA_EXECUTOR_H
LuaRef
int LuaRef
Definition: types.h:23
defs.h
REAL_FATTR_NONNULL_ALL
#define REAL_FATTR_NONNULL_ALL
Definition: func_attr.h:183
converter.h
typval.h
EXTERN
#define EXTERN
Definition: macros.h:9
INIT
EXTERN LuaRef nlua_nil_ref INIT(=LUA_NOREF)
ex_cmds_defs.h
nlua_add_api_functions
void nlua_add_api_functions(lua_State *lstate) REAL_FATTR_NONNULL_ALL
func_attr.h