diff options
Diffstat (limited to 'vis-lua.c')
| -rw-r--r-- | vis-lua.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1889,6 +1889,15 @@ void vis_lua_init(Vis *vis) { vis->lua = L; luaL_openlibs(L); +#if CONFIG_BUILTIN_LPEG + extern int luaopen_lpeg(lua_State *L); + lua_getglobal(L, "package"); + lua_getfield(L, -1, "preload"); + lua_pushcfunction(L, luaopen_lpeg); + lua_setfield(L, -2, "lpeg"); + lua_pop(L, 2); +#endif + /* remove any relative paths from lua's default package.path */ vis_lua_path_strip(vis); |
