Defines | Enumerations | Functions | Variables

lua/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.

Defines

#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]

Define Documentation

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

Definition at line 44 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]))

Definition at line 41 of file ltm.h.

Referenced by luaC_checkfinalizer(), and traversetable().

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

Definition at line 47 of file ltm.h.

Referenced by luaG_ordererror(), and luaG_typeerror().

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

Definition at line 46 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 18 of file ltm.h.


Function Documentation

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

Definition at line 52 of file ltm.c.

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

Here is the call graph for this function:

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

Definition at line 63 of file ltm.c.

References G, hvalue, LUA_TTABLE, LUA_TUSERDATA, luaH_getstr(), luaO_nilobject, ttypenv, and uvalue.

Referenced by call_binTM(), GCTM(), luaV_finishOp(), luaV_gettable(), luaV_objlen(), luaV_settable(), and tryfuncTM().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC void luaT_init ( lua_State L  ) 

Definition at line 32 of file ltm.c.

References G, luaS_fix, and luaS_new().

Referenced by f_luaopen().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

LUAI_DDEC const char* const luaT_typenames_[LUA_TOTALTAGS]

Definition at line 49 of file ltm.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:08:02 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs