lua: add select to the list of allowed functions

This function is safe (and was already documented) so let's make sure
it's available.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1354>
This commit is contained in:
Peter Hutterer 2025-11-03 14:57:19 +10:00 committed by Marge Bot
parent 4ffd8ab544
commit ad6f580b6d

View file

@ -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", "tonumber", "tostring", "type", "xpcall",
"assert", "error", "ipairs", "next", "pcall", "pairs",
"print", "select", "tonumber", "tostring", "type", "xpcall",
};
ARRAY_FOR_EACH(allowed_funcs, func) {
lua_getglobal(L, *func);