The Battle for Wesnoth  1.15.12+dev
Macros | Typedefs | Functions
ldo.h File Reference
#include "lobject.h"
#include "lstate.h"
#include "lzio.h"
Include dependency graph for ldo.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define luaD_checkstackaux(L, n, pre, pos)
#define luaD_checkstack(L, n)   luaD_checkstackaux(L,n,(void)0,(void)0)
#define savestack(L, p)   ((char *)(p) - (char *)L->stack)
#define restorestack(L, n)   ((StkId)((char *)L->stack + (n)))
#define checkstackGCp(L, n, p)
#define checkstackGC(L, fsize)   luaD_checkstackaux(L, (fsize), luaC_checkGC(L), (void)0)


typedef void(* Pfunc) (lua_State *L, void *ud)


LUAI_FUNC void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop)
LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name, const char *mode)
LUAI_FUNC void luaD_hook (lua_State *L, int event, int line, int fTransfer, int nTransfer)
LUAI_FUNC void luaD_hookcall (lua_State *L, CallInfo *ci)
LUAI_FUNC void luaD_pretailcall (lua_State *L, CallInfo *ci, StkId func, int n)
LUAI_FUNC CallInfoluaD_precall (lua_State *L, StkId func, int nResults)
LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults)
LUAI_FUNC void luaD_callnoyield (lua_State *L, StkId func, int nResults)
LUAI_FUNC void luaD_tryfuncTM (lua_State *L, StkId func)
LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u, ptrdiff_t oldtop, ptrdiff_t ef)
LUAI_FUNC void luaD_poscall (lua_State *L, CallInfo *ci, int nres)
LUAI_FUNC int luaD_reallocstack (lua_State *L, int newsize, int raiseerror)
LUAI_FUNC int luaD_growstack (lua_State *L, int n, int raiseerror)
LUAI_FUNC void luaD_shrinkstack (lua_State *L)
LUAI_FUNC void luaD_inctop (lua_State *L)
LUAI_FUNC l_noret luaD_throw (lua_State *L, int errcode)
LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud)

Macro Definition Documentation

◆ checkstackGC

#define checkstackGC (   L,
)    luaD_checkstackaux(L, (fsize), luaC_checkGC(L), (void)0)

Definition at line 48 of file ldo.h.

Referenced by luaD_pretailcall().

◆ checkstackGCp

#define checkstackGCp (   L,
ptrdiff_t t__ = savestack(L, p); /* save 'p' */ \
luaC_checkGC(L), /* stack grow uses memory */ \
p = restorestack(L, t__)) /* 'pos' part: restore 'p' */
#define restorestack(L, n)
Definition: ldo.h:36
#define luaD_checkstackaux(L, n, pre, pos)
Definition: ldo.h:25
mock_party p
#define savestack(L, p)
Definition: ldo.h:35
static map_location::DIRECTION n

Definition at line 40 of file ldo.h.

Referenced by luaD_precall(), luaT_getvarargs(), and luaV_execute().

◆ luaD_checkstack

#define luaD_checkstack (   L,
)    luaD_checkstackaux(L,n,(void)0,(void)0)

Definition at line 31 of file ldo.h.

Referenced by luaD_hook(), luaD_inctop(), and luaT_adjustvarargs().

◆ luaD_checkstackaux

#define luaD_checkstackaux (   L,
if (L->stack_last - L->top <= (n)) \
{ pre; luaD_growstack(L, n, 1); pos; } \
else { condmovestack(L,pre,pos); }
#define condmovestack(L, pre, pos)
Definition: llimits.h:355
LUAI_FUNC int luaD_growstack(lua_State *L, int n, int raiseerror)
Definition: ldo.cpp:207
static map_location::DIRECTION n

Definition at line 25 of file ldo.h.

◆ restorestack

#define restorestack (   L,
)    ((StkId)((char *)L->stack + (n)))

◆ savestack

#define savestack (   L,
)    ((char *)(p) - (char *)L->stack)

Typedef Documentation

◆ Pfunc

typedef void(* Pfunc) (lua_State *L, void *ud)

Definition at line 53 of file ldo.h.

Function Documentation

◆ luaD_call()

LUAI_FUNC void luaD_call ( lua_State L,
StkId  func,
int  nResults 

Definition at line 557 of file ldo.cpp.

References ccall().

Referenced by lua_callk(), lua_pcallk(), luaT_callTM(), luaT_callTMres(), and luaV_execute().

◆ luaD_callnoyield()

LUAI_FUNC void luaD_callnoyield ( lua_State L,
StkId  func,
int  nResults 

Definition at line 565 of file ldo.cpp.

References ccall(), and nyci.

Referenced by callclose(), dothecall(), f_call(), lua_callk(), luaG_errormsg(), luaT_callTM(), and luaT_callTMres().

◆ luaD_growstack()

LUAI_FUNC int luaD_growstack ( lua_State L,
int  n,
int  raiseerror 

◆ luaD_hook()

LUAI_FUNC void luaD_hook ( lua_State L,
int  event,
int  line,
int  fTransfer,
int  nTransfer 

◆ luaD_hookcall()

LUAI_FUNC void luaD_hookcall ( lua_State L,
CallInfo ci 

◆ luaD_inctop()

LUAI_FUNC void luaD_inctop ( lua_State L)

Definition at line 281 of file ldo.cpp.

References luaD_checkstack, and lua_State::top.

Referenced by loadStringN(), luaU_undump(), and luaY_parser().

◆ luaD_pcall()

LUAI_FUNC int luaD_pcall ( lua_State L,
Pfunc  func,
void *  u,
ptrdiff_t  oldtop,
ptrdiff_t  ef 

◆ luaD_poscall()

LUAI_FUNC void luaD_poscall ( lua_State L,
CallInfo ci,
int  nres 

◆ luaD_precall()

LUAI_FUNC CallInfo* luaD_precall ( lua_State L,
StkId  func,
int  nResults 

◆ luaD_pretailcall()

LUAI_FUNC void luaD_pretailcall ( lua_State L,
CallInfo ci,
StkId  func,
int  n 

◆ luaD_protectedparser()

LUAI_FUNC int luaD_protectedparser ( lua_State L,
ZIO z,
const char *  name,
const char *  mode 

◆ luaD_rawrunprotected()

LUAI_FUNC int luaD_rawrunprotected ( lua_State L,
Pfunc  f,
void *  ud 

◆ luaD_reallocstack()

LUAI_FUNC int luaD_reallocstack ( lua_State L,
int  newsize,
int  raiseerror 

◆ luaD_seterrorobj()

LUAI_FUNC void luaD_seterrorobj ( lua_State L,
int  errcode,
StkId  oldtop 

◆ luaD_shrinkstack()

LUAI_FUNC void luaD_shrinkstack ( lua_State L)

◆ luaD_throw()

LUAI_FUNC l_noret luaD_throw ( lua_State L,
int  errcode 

◆ luaD_tryfuncTM()

LUAI_FUNC void luaD_tryfuncTM ( lua_State L,
StkId  func 

Definition at line 374 of file ldo.cpp.

References luaG_typeerror(), luaT_gettmbyobj(), p, s2v, setobj2s, setobjs2s, TM_CALL, lua_State::top, ttisnil, and unlikely.

Referenced by luaD_precall(), and luaV_execute().