aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/viml/executor/executor.h
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2016-03-04 21:55:28 +0300
committerZyX <kp-pav@yandex.ru>2017-03-27 00:11:24 +0300
commite7bbd8256b8c701205389be431bbafd8743c72a9 (patch)
tree9fc9a9754da4d856b94f8388ff700a01711dfe68 /src/nvim/viml/executor/executor.h
parentf9a31e98505c0f5e83dd3ba957fbd0f4b150d30c (diff)
downloadrneovim-e7bbd8256b8c701205389be431bbafd8743c72a9.tar.gz
rneovim-e7bbd8256b8c701205389be431bbafd8743c72a9.tar.bz2
rneovim-e7bbd8256b8c701205389be431bbafd8743c72a9.zip
eval: Add luaeval function
No tests yet, no documentation update, no :lua* stuff, no vim module. converter.c should also work with typval_T, not Object. Known problem: luaeval("1", {}) results in PANIC: unprotected error in call to Lua API (attempt to index a nil value) Ref #3823
Diffstat (limited to 'src/nvim/viml/executor/executor.h')
-rw-r--r--src/nvim/viml/executor/executor.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/nvim/viml/executor/executor.h b/src/nvim/viml/executor/executor.h
new file mode 100644
index 0000000000..85cb3550e7
--- /dev/null
+++ b/src/nvim/viml/executor/executor.h
@@ -0,0 +1,23 @@
+#ifndef NVIM_VIML_EXECUTOR_EXECUTOR_H
+#define NVIM_VIML_EXECUTOR_EXECUTOR_H
+
+#include <lua.h>
+
+#include "nvim/api/private/defs.h"
+#include "nvim/func_attr.h"
+
+// Generated by msgpack-gen.lua
+void nlua_add_api_functions(lua_State *lstate) REAL_FATTR_NONNULL_ALL;
+
+#define set_api_error(s, err) \
+ do { \
+ Error *err_ = (err); \
+ err_->type = kErrorTypeException; \
+ err_->set = true; \
+ memcpy(&err_->msg[0], s, sizeof(s)); \
+ } while (0)
+
+#ifdef INCLUDE_GENERATED_DECLARATIONS
+# include "viml/executor/executor.h.generated.h"
+#endif
+#endif // NVIM_VIML_EXECUTOR_EXECUTOR_H