From ba484b9eb16dd62a7c3a5400a66eb952b654d3f0 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 10 Mar 2009 14:14:37 -0300 Subject: yielding across lua_call (first version) --- lapi.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lapi.h') diff --git a/lapi.h b/lapi.h index b9ca73bf..82ff87c6 100644 --- a/lapi.h +++ b/lapi.h @@ -1,5 +1,5 @@ /* -** $Id: lapi.h,v 2.2 2005/04/25 19:24:10 roberto Exp roberto $ +** $Id: lapi.h,v 2.3 2006/07/11 15:53:29 roberto Exp roberto $ ** Auxiliary functions from Lua API ** See Copyright Notice in lua.h */ @@ -13,4 +13,8 @@ #define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top);} +#define adjustresults(L,nres) \ + { if ((nres) == LUA_MULTRET && L->top >= L->ci->top) L->ci->top = L->top; } + + #endif -- cgit v1.2.3-55-g6feb