|
> By enabling the API checks you mean these lines in lapi.h? :
>
> #define api_incr_top(L) {L->top++; api_check(L->top <= L->ci->top, \
> "stack overflow");}
>
> #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((n) < (L->top - L->ci->func), \
> "not enough elements in the stack")
He probably means this lines in luaconf.h:
/*
@@ LUA_USE_APICHECK turns on several consistency checks on the C API.
** Define it as a help when debugging C code.
*/
#if defined(LUA_USE_APICHECK)
#include <assert.h>
#define luai_apicheck(l,e) assert(e)
#endif
You only have to define LUA_USE_APICHECK.
-- Roberto