From 2a2c2e97a9be9fc4db30842ad61e46a1fd7cd125 Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Mon, 11 Aug 2014 11:53:25 -0700 Subject: Bugs fixing in Lua - we really can't afford to have destructors throwing exceptions, and also making sure we're using the proper types for Handles. --- src/BLua.cc | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/BLua.cc') diff --git a/src/BLua.cc b/src/BLua.cc index f70cf99..55daa3f 100644 --- a/src/BLua.cc +++ b/src/BLua.cc @@ -11,6 +11,7 @@ #include "HelperTasks.h" #include "StacklessTask.h" #include "TaskMan.h" +#include "LuaHandle.h" extern "C" { #include @@ -98,7 +99,7 @@ int Balau::LuaStatics::dumpvars(lua_State * __L) { if (L.isstring(2)) L.getglobal(L.tostring(2).to_charp()); - IO h(L.recast()); + IO h(L.recast()->getIO()); if (!h->canEAgainOnWrite()) { L.dumpvars(h, prefix); @@ -312,19 +313,6 @@ int Balau::LuaStatics::callwrap(lua_State * __L, lua_CFunction func) { return r; } -namespace { - -class CollectorTask : public Balau::StacklessTask { - public: - CollectorTask(Balau::LuaObjectBase * obj) : m_obj(obj) { } - private: - virtual const char * getName() const override { return "CollectorTask"; } - virtual void Do() override { delete m_obj; } - Balau::LuaObjectBase * m_obj; -}; - -}; - int Balau::LuaStatics::collector(lua_State * __L) { Lua L(__L); LuaObjectBase * o = (LuaObjectBase *) L.touserdata(); -- cgit v1.2.3