diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/BLua.h | 19 |
1 files changed, 18 insertions, 1 deletions
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 <lua.h> #include <map> #include <Exceptions.h> @@ -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; |