From 61a150c500fd64d1eeae74f9abb6829721261d39 Mon Sep 17 00:00:00 2001 From: pixel Date: Fri, 23 Jul 2004 13:08:22 +0000 Subject: Adding some LUA features --- include/BLua.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/BLua.h b/include/BLua.h index c1b71c8..a0daa59 100644 --- a/include/BLua.h +++ b/include/BLua.h @@ -17,11 +17,21 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: BLua.h,v 1.16 2004-07-22 23:38:31 pixel Exp $ */ +/* $Id: BLua.h,v 1.17 2004-07-23 13:08:22 pixel Exp $ */ #ifndef __BLUA_H__ #define __BLUA_H__ +struct lua_State; + +extern "C" { + void do_lua_lock(lua_State *); + void do_lua_unlock(lua_State *); +} + +#define lua_lock(L) do_lua_lock(L) +#define lua_unlock(L) do_lua_unlock(L) + #include #include #include @@ -75,11 +85,18 @@ class Lua : public Base { void load(Handle *, bool docall = true) throw (GeneralException); void dump(Handle *, bool strip = true); Lua * thread(); + int yield(int nargs = 0); + int resume(int nresults = 0); static Lua * find(lua_State *) throw (GeneralException); void showerror(); int getmetatable(int = -1); int setmetatable(int = -2); int sethook(lua_Hook func, int mask, int count); + + void do_break(); + + virtual void lock() {} + virtual void unlock() {} private: Lua(lua_State *); lua_State * L; -- cgit v1.2.3