summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2014-01-19 11:46:51 (GMT)
committerRemko Tronçon <git@el-tramo.be>2014-01-19 16:49:19 (GMT)
commitcbd01a5368f0b761d2032d75c9f7dfde2bf61578 (patch)
tree5016505b1e977e84655cc3bba4435ef7cb80e811 /Sluift/Lua/LuaUtils.cpp
parent4083d6da47ac0e3b77da9c7c222a9439b3e1c04c (diff)
downloadswift-cbd01a5368f0b761d2032d75c9f7dfde2bf61578.zip
swift-cbd01a5368f0b761d2032d75c9f7dfde2bf61578.tar.bz2
Sluift: Add iTunes & PEP User Tune support
Change-Id: I25b3840bb40ce38531922cc737bc82828e026d3f
Diffstat (limited to 'Sluift/Lua/LuaUtils.cpp')
-rw-r--r--Sluift/Lua/LuaUtils.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Sluift/Lua/LuaUtils.cpp b/Sluift/Lua/LuaUtils.cpp
index 2192689..915f3cc 100644
--- a/Sluift/Lua/LuaUtils.cpp
+++ b/Sluift/Lua/LuaUtils.cpp
@@ -32,6 +32,17 @@ void Swift::Lua::registerTableToString(lua_State* L, int index) {
lua_pop(L, 1);
}
+void Swift::Lua::registerTableEquals(lua_State* L, int index) {
+ index = Lua::absoluteOffset(L, index);
+ lua_rawgeti(L, LUA_REGISTRYINDEX, Sluift::globals.coreLibIndex);
+ lua_getfield(L, -1, "register_table_equals");
+ lua_pushvalue(L, index);
+ if (lua_pcall(L, 1, 0, 0) != 0) {
+ throw Lua::Exception(lua_tostring(L, -1));
+ }
+ lua_pop(L, 1);
+}
+
void Swift::Lua::registerGetByTypeIndex(lua_State* L, int index) {
index = Lua::absoluteOffset(L, index);
lua_rawgeti(L, LUA_REGISTRYINDEX, Sluift::globals.coreLibIndex);