The Battle for Wesnoth  1.15.1+dev
Macros | Functions | Variables
ltm.cpp File Reference
#include "lprefix.h"
#include <string.h>
#include "lua.h"
#include "ldebug.h"
#include "ldo.h"
#include "lobject.h"
#include "lstate.h"
#include "lstring.h"
#include "ltable.h"
#include "ltm.h"
#include "lvm.h"
Include dependency graph for ltm.cpp:

Go to the source code of this file.

Macros

#define ltm_c
 
#define LUA_CORE
 

Functions

void luaT_init (lua_State *L)
 
const TValueluaT_gettm (Table *events, TMS event, TString *ename)
 
const TValueluaT_gettmbyobj (lua_State *L, const TValue *o, TMS event)
 
const char * luaT_objtypename (lua_State *L, const TValue *o)
 
void luaT_callTM (lua_State *L, const TValue *f, const TValue *p1, const TValue *p2, TValue *p3, int hasres)
 
int luaT_callbinTM (lua_State *L, const TValue *p1, const TValue *p2, StkId res, TMS event)
 
void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, StkId res, TMS event)
 
int luaT_callorderTM (lua_State *L, const TValue *p1, const TValue *p2, TMS event)
 

Variables

static const char udatatypename [] = "userdata"
 
LUAI_DDEF const char *const luaT_typenames_ [LUA_TOTALTAGS]
 

Macro Definition Documentation

◆ ltm_c

#define ltm_c

Definition at line 7 of file ltm.cpp.

◆ LUA_CORE

#define LUA_CORE

Definition at line 8 of file ltm.cpp.

Function Documentation

◆ luaT_callbinTM()

int luaT_callbinTM ( lua_State L,
const TValue p1,
const TValue p2,
StkId  res,
TMS  event 
)

Definition at line 124 of file ltm.cpp.

References luaT_callTM(), luaT_gettmbyobj(), and ttisnil.

Referenced by luaT_callorderTM(), and luaT_trybinTM().

◆ luaT_callorderTM()

int luaT_callorderTM ( lua_State L,
const TValue p1,
const TValue p2,
TMS  event 
)

Definition at line 158 of file ltm.cpp.

References l_isfalse, luaT_callbinTM(), and lua_State::top.

Referenced by luaV_lessequal(), and luaV_lessthan().

◆ luaT_callTM()

void luaT_callTM ( lua_State L,
const TValue f,
const TValue p1,
const TValue p2,
TValue p3,
int  hasres 
)

◆ luaT_gettm()

const TValue* luaT_gettm ( Table events,
TMS  event,
TString ename 
)

Definition at line 59 of file ltm.cpp.

References cast_byte, Table::flags, lua_assert, luaH_getshortstr(), TM_EQ, and ttisnil.

◆ luaT_gettmbyobj()

const TValue* luaT_gettmbyobj ( lua_State L,
const TValue o,
TMS  event 
)

◆ luaT_init()

void luaT_init ( lua_State L)

Definition at line 37 of file ltm.cpp.

References G, i, luaC_fix(), luaS_new(), obj2gco, and TM_N.

Referenced by f_luaopen().

◆ luaT_objtypename()

const char* luaT_objtypename ( lua_State L,
const TValue o 
)

◆ luaT_trybinTM()

void luaT_trybinTM ( lua_State L,
const TValue p1,
const TValue p2,
StkId  res,
TMS  event 
)

Variable Documentation

◆ luaT_typenames_

LUAI_DDEF const char* const luaT_typenames_[LUA_TOTALTAGS]
Initial value:
= {
"no value",
"nil", "boolean", udatatypename, "number",
"string", "table", "function", udatatypename, "thread",
"proto"
}
static const char udatatypename[]
Definition: ltm.cpp:27

Definition at line 29 of file ltm.cpp.

◆ udatatypename

const char udatatypename[] = "userdata"
static

Definition at line 27 of file ltm.cpp.