From cd5da6097812baf125c2dc4f1d12e1a3f4985464 Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Mon, 5 Aug 2013 11:53:57 -0700 Subject: Greatly simplifying the LuaYield mechanism so to avoid double-recursive calls in resume(). --- includes/BLua.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'includes/BLua.h') diff --git a/includes/BLua.h b/includes/BLua.h index a464a77..ccf7bee 100644 --- a/includes/BLua.h +++ b/includes/BLua.h @@ -162,7 +162,7 @@ class Lua { void dumpvars(IO out, const String & prefix, int idx = -1); Lua thread(bool saveit = true); int yield(int nresults = 0) { return lua_yield(L, nresults); } - int yield(Future) throw (GeneralException) __attribute__((noreturn)); + int yield(Future) throw (GeneralException); bool yielded() { return lua_status(L) == LUA_YIELD; } bool resume(int nargs = 0) throw (GeneralException); void showstack(int level = M_INFO); @@ -195,8 +195,8 @@ class Lua { private: void dumpvars_i(IO out, const String & prefix, int idx); void dumpvars_r(IO out, int idx, int depth = 0) throw (GeneralException); - bool resumeC(); - bool yieldC() throw (GeneralException); + bool resumeC(int & nargs); + void yieldC() throw (GeneralException); void processException(GeneralException & e); lua_State * L; -- cgit v1.2.3