mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
CLuaInstance: Add additional tableLookup for get userdata
This commit is contained in:
@@ -677,6 +677,18 @@ bool CLuaInstance::tableLookup(lua_State *L, const char *what, int &value)
|
||||
return res;
|
||||
}
|
||||
|
||||
bool CLuaInstance::tableLookup(lua_State *L, const char *what, void** value)
|
||||
{
|
||||
bool res = false;
|
||||
lua_pushstring(L, what);
|
||||
lua_gettable(L, -2);
|
||||
res = lua_isuserdata(L, -1);
|
||||
if (res)
|
||||
*value = lua_unboxpointer(L, -1);
|
||||
lua_pop(L, 1);
|
||||
return res;
|
||||
}
|
||||
|
||||
bool CLuaMenuChangeObserver::changeNotify(lua_State *L, const std::string &luaAction, const std::string &luaId, void *Data)
|
||||
{
|
||||
const char *optionValue = (const char *) Data;
|
||||
|
Reference in New Issue
Block a user