extra api checks for number of returns of C functions and for lua_yield
This commit is contained in:
5
lapi.h
5
lapi.h
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lapi.h,v 2.5 2009/04/03 15:58:03 roberto Exp roberto $
|
||||
** $Id: lapi.h,v 2.6 2009/08/31 14:26:28 roberto Exp roberto $
|
||||
** Auxiliary functions from Lua API
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@@ -17,5 +17,8 @@
|
||||
#define adjustresults(L,nres) \
|
||||
{ if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; }
|
||||
|
||||
#define api_checknelems(L,n) api_check(L, (n) < (L->top - L->ci->func), \
|
||||
"not enough elements in the stack")
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user