From 8e017078576f9dc26a35733a3af3d1d92bc98726 Mon Sep 17 00:00:00 2001 From: pixel Date: Sun, 27 May 2007 13:04:17 +0000 Subject: Adding better threading support for LuaTask, and fixing LuaTask a bit. --- include/LuaTask.h | 8 ++++++-- include/hashtab.h | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/LuaTask.h b/include/LuaTask.h index fcc1363..eded9ac 100644 --- a/include/LuaTask.h +++ b/include/LuaTask.h @@ -1,6 +1,8 @@ #ifndef __LUATASK_H__ #define __LUATASK_H__ +#include + #include #include #include @@ -9,12 +11,14 @@ class LuaTask : public Task { public: LuaTask(Lua *, const String &); - LuaTask(Lua *, int); + LuaTask(Lua *, int) throw (GeneralException); virtual ~LuaTask(); virtual String GetName(); protected: virtual int Do() throw (GeneralException); private: + LuaTask * gettop(); + void settop(LuaTask *); Lua * L; String cmd; int nargs, stacktop, r; @@ -24,7 +28,7 @@ class LuaTask : public Task { String task; - static LuaTask * top; + static htab * h; }; #endif diff --git a/include/hashtab.h b/include/hashtab.h index c2e7c46..6d2d504 100644 --- a/include/hashtab.h +++ b/include/hashtab.h @@ -31,6 +31,8 @@ This implements a hash table. #ifndef HASHTAB #define HASHTAB +#include + /* PRIVATE TYPES AND DEFINITIONS */ struct hitem @@ -126,7 +128,7 @@ int hfind(htab *t, Uint8 *key, Uint32 keyl); RETURNS: FALSE if the operation fails (because that key is already there). */ -int hadd(htab *t, ub1 *key, ub4 keyl, void *stuff); +int hadd(htab *t, Uint8 *key, Uint32 keyl, void *stuff); /* hdel - delete the item at the current position -- cgit v1.2.3