summaryrefslogtreecommitdiff
path: root/src/BLua.cc
diff options
context:
space:
mode:
authorNicolas Noble <pixel@nobis-crew.org>2014-08-11 11:53:25 -0700
committerNicolas Noble <pixel@nobis-crew.org>2014-08-11 11:53:25 -0700
commit2a2c2e97a9be9fc4db30842ad61e46a1fd7cd125 (patch)
tree843518e97789df9b85ac2fcc32417e1ec59b1656 /src/BLua.cc
parent3664fe8db6a88e2aed5bc9425dfae92828851a42 (diff)
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.
Diffstat (limited to 'src/BLua.cc')
-rw-r--r--src/BLua.cc16
1 files changed, 2 insertions, 14 deletions
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 <lualib.h>
@@ -98,7 +99,7 @@ int Balau::LuaStatics::dumpvars(lua_State * __L) {
if (L.isstring(2))
L.getglobal(L.tostring(2).to_charp());
- IO<Handle> h(L.recast<Balau::Handle>());
+ IO<Handle> h(L.recast<LuaIO>()->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();