diff --git a/doc/user/lua-plugins.rst b/doc/user/lua-plugins.rst index f7d7a55a..c2683266 100644 --- a/doc/user/lua-plugins.rst +++ b/doc/user/lua-plugins.rst @@ -50,7 +50,7 @@ The Lua API available to plugins is limited to the following calls:: assert error ipairs next pairs tonumber pcall select print tostring type xpcall - table string math + table string math _VERSION It is not possible to e.g. use the ``io`` module from a script. diff --git a/src/libinput-plugin-lua.c b/src/libinput-plugin-lua.c index 86158a60..c11998f3 100644 --- a/src/libinput-plugin-lua.c +++ b/src/libinput-plugin-lua.c @@ -1221,8 +1221,8 @@ libinput_lua_plugin_init_lua(struct libinput *libinput, luaopen_base(L); static const char *allowed_funcs[] = { - "assert", "error", "ipairs", "next", "pcall", "pairs", - "print", "select", "tonumber", "tostring", "type", "xpcall", + "assert", "error", "ipairs", "next", "pcall", "pairs", "print", + "select", "tonumber", "tostring", "type", "xpcall", "_VERSION", }; ARRAY_FOR_EACH(allowed_funcs, func) { lua_getglobal(L, *func);