aboutsummaryrefslogtreecommitdiff
path: root/src/nlua0.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nlua0.c')
-rw-r--r--src/nlua0.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nlua0.c b/src/nlua0.c
new file mode 100644
index 0000000000..2cfa16b804
--- /dev/null
+++ b/src/nlua0.c
@@ -0,0 +1,18 @@
+#include <lua.h>
+
+#include "mpack/lmpack.h"
+
+LUA_API int luaopen_nlua0(lua_State* L);
+
+LUA_API int luaopen_nlua0(lua_State* L) {
+ lua_getglobal(L, "vim");
+ luaopen_mpack(L);
+ lua_setfield(L, -2, "mpack");
+
+ int luaopen_lpeg(lua_State *);
+ luaopen_lpeg(L);
+ lua_setfield(L, -3, "lpeg");
+ lua_pop(L, 2);
+
+ return 1;
+}