The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Macros | Enumerations | Functions | Variables
ltm.h File Reference
#include "lobject.h"
Include dependency graph for ltm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define gfasttm(g, et, e)
 
#define fasttm(l, et, e)   gfasttm(G(l), et, e)
 
#define ttypename(x)   luaT_typenames_[(x) + 1]
 
#define objtypename(x)   ttypename(ttypenv(x))
 

Enumerations

enum  TMS {
  TM_INDEX, TM_NEWINDEX, TM_GC, TM_MODE,
  TM_LEN, TM_EQ, TM_ADD, TM_SUB,
  TM_MUL, TM_DIV, TM_MOD, TM_POW,
  TM_UNM, TM_LT, TM_LE, TM_CONCAT,
  TM_CALL, TM_N
}
 

Functions

LUAI_FUNC const TValueluaT_gettm (Table *events, TMS event, TString *ename)
 
LUAI_FUNC const TValueluaT_gettmbyobj (lua_State *L, const TValue *o, TMS event)
 
LUAI_FUNC void luaT_init (lua_State *L)
 

Variables

LUAI_DDEC const char *const luaT_typenames_ [LUA_TOTALTAGS]
 

Macro Definition Documentation

#define fasttm (   l,
  et,
  e 
)    gfasttm(G(l), et, e)

Definition at line 43 of file ltm.h.

Referenced by get_equalTM(), luaV_gettable(), luaV_objlen(), and luaV_settable().

#define gfasttm (   g,
  et,
  e 
)
Value:
((et) == NULL ? NULL : \
((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e]))
GLboolean GLboolean g
Definition: glew.h:7319
LUAI_FUNC const TValue * luaT_gettm(Table *events, TMS event, TString *ename)
Definition: ltm.cpp:51
#define e

Definition at line 40 of file ltm.h.

Referenced by luaC_checkfinalizer(), and traversetable().

#define objtypename (   x)    ttypename(ttypenv(x))

Definition at line 46 of file ltm.h.

Referenced by luaG_ordererror(), and luaG_typeerror().

#define ttypename (   x)    luaT_typenames_[(x) + 1]

Definition at line 45 of file ltm.h.

Referenced by lua_typename().

Enumeration Type Documentation

enum TMS
Enumerator
TM_INDEX 
TM_NEWINDEX 
TM_GC 
TM_MODE 
TM_LEN 
TM_EQ 
TM_ADD 
TM_SUB 
TM_MUL 
TM_DIV 
TM_MOD 
TM_POW 
TM_UNM 
TM_LT 
TM_LE 
TM_CONCAT 
TM_CALL 
TM_N 

Definition at line 17 of file ltm.h.

Function Documentation

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

Definition at line 51 of file ltm.cpp.

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

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

Definition at line 31 of file ltm.cpp.

References G, i, luaS_fix, luaS_new(), and TM_N.

Referenced by f_luaopen().

Variable Documentation

LUAI_DDEC const char* const luaT_typenames_[LUA_TOTALTAGS]

Definition at line 48 of file ltm.h.