1 /* $NetBSD: ltm.h,v 1.3 2015/02/02 14:03:05 lneto Exp $ */
4 ** Id: ltm.h,v 2.21 2014/10/25 11:50:46 roberto Exp
6 ** See Copyright Notice in lua.h
17 * WARNING: if you change the order of this enumeration,
18 * grep "ORDER TM" and "ORDER OP"
26 TM_EQ
, /* last tag method with fast access */
47 TM_N
/* number of elements in the enum */
52 #define gfasttm(g,et,e) ((et) == NULL ? NULL : \
53 ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e]))
55 #define fasttm(l,et,e) gfasttm(G(l), et, e)
57 #define ttypename(x) luaT_typenames_[(x) + 1]
58 #define objtypename(x) ttypename(ttnov(x))
60 LUAI_DDEC
const char *const luaT_typenames_
[LUA_TOTALTAGS
];
63 LUAI_FUNC
const TValue
*luaT_gettm (Table
*events
, TMS event
, TString
*ename
);
64 LUAI_FUNC
const TValue
*luaT_gettmbyobj (lua_State
*L
, const TValue
*o
,
66 LUAI_FUNC
void luaT_init (lua_State
*L
);
68 LUAI_FUNC
void luaT_callTM (lua_State
*L
, const TValue
*f
, const TValue
*p1
,
69 const TValue
*p2
, TValue
*p3
, int hasres
);
70 LUAI_FUNC
int luaT_callbinTM (lua_State
*L
, const TValue
*p1
, const TValue
*p2
,
71 StkId res
, TMS event
);
72 LUAI_FUNC
void luaT_trybinTM (lua_State
*L
, const TValue
*p1
, const TValue
*p2
,
73 StkId res
, TMS event
);
74 LUAI_FUNC
int luaT_callorderTM (lua_State
*L
, const TValue
*p1
,
75 const TValue
*p2
, TMS event
);