1 2 3 4 5 6 7 8 9 10 11 12 13
#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"); return 1; }