mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 20:08:17 +00:00
fix(build): distinguish vim.mpack from global require'mpack'
problem: the api of vim.mpack is not compatible with a system provided mpack solution: don't require 'mpack' directly from the system path
This commit is contained in:
13
src/nlua0.c
Normal file
13
src/nlua0.c
Normal file
@@ -0,0 +1,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;
|
||||
}
|
Reference in New Issue
Block a user