/* type of protected functions, to be ran by `runprotected' */
void D_throw(int errcode);
int D_protectedparser(ZIO *z, const char *name);
void D_callhook(int event, int line);
int D_precall(StkId func, int nresults);
void D_call(StkId func, int nResults);
int D_pcall(Pfunc func, void *u, ptrdiff_t old_top, ptrdiff_t ef);
int D_poscall(StkId firstResult);
void D_reallocCI(int newsize);
void D_reallocstack(int newsize);
void D_growstack(int n);
void D_checkstack(int n) {
if ((char *)this->stack_last - (char *)this->top <=
(n) * (int)sizeof(TValue))
this->D_growstack(n);
else
condhardstacktests(
luaD_reallocstack(this, this->stacksize - EXTRA_STACK - 1));
}
int D_rawrunprotected(Pfunc f, void *ud);
void D_seterrorobj(int errcode, StkId oldtop);
void incr_top() {
D_checkstack(1);
this->top++;
}
int savestack(StkId p) { return ((char *)(p) - (char *)this->stack); }
CallInfo *restoreci(int n) {
return ((CallInfo *)((char *)this->base_ci + (n)));
}
int saveci(CallInfo *p) { return ((char *)(p) - (char *)this->base_ci); }
TValue *restorestack(int n) {
return ((TValue *)((char *)this->stack + (n)));
}