summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/BLua.cc16
-rw-r--r--src/LuaHandle.cc8
2 files changed, 6 insertions, 18 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();
diff --git a/src/LuaHandle.cc b/src/LuaHandle.cc
index 440a4f3..6ee6691 100644
--- a/src/LuaHandle.cc
+++ b/src/LuaHandle.cc
@@ -2,8 +2,8 @@
#include "LuaBigInt.h"
#include "Handle.h"
-typedef Balau::IO<Balau::Handle> IOHandle;
-typedef IOHandle IOInput;
+typedef Balau::LuaIO IOHandle;
+typedef Balau::LuaIO IOInput;
// Handle exports
@@ -102,7 +102,7 @@ struct sLua_IOHandle {
int sLua_IOHandle::IOHandle_proceed(Balau::Lua & L, int n, IOHandle * obj, int caller) {
int r = 0;
- Balau::IO<Balau::Handle> h = *obj;
+ Balau::IO<Balau::Handle> h = obj->getIO();
switch (caller) {
case IOHANDLE_CLOSE:
@@ -538,7 +538,7 @@ int sLua_IOInput::IOInput_proceed_static(Balau::Lua & L, int n, int caller) {
}
int sLua_IOInput::IOInput_proceed(Balau::Lua & L, int n, IOInput * obj, int caller) {
- Balau::IO<Balau::Input> h = *obj;
+ Balau::IO<Balau::Input> h = obj->getIO();
switch (caller) {
case IOINPUT_OPEN: