rpm  4.5
ltm.h
Go to the documentation of this file.
1 /*
2 ** $Id: ltm.h,v 1.1 2004/03/16 21:58:30 niemeyer Exp $
3 ** Tag methods
4 ** See Copyright Notice in lua.h
5 */
6 
7 #ifndef ltm_h
8 #define ltm_h
9 
10 
11 #include "lobject.h"
12 
13 
14 /*
15 * WARNING: if you change the order of this enumeration,
16 * grep "ORDER TM"
17 */
18 typedef enum {
23  TM_EQ, /* last tag method with `fast' access */
34  TM_N /* number of elements in the enum */
35 } TMS;
36 
37 
38 
39 #define gfasttm(g,et,e) \
40  (((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e]))
41 
42 #define fasttm(l,et,e) gfasttm(G(l), et, e)
43 
44 
45 /*@observer@*/ /*@null@*/
46 const TObject *luaT_gettm (Table *events, TMS event, TString *ename)
47  /*@modifies events @*/;
48 /*@observer@*/
49 const TObject *luaT_gettmbyobj (lua_State *L, const TObject *o, TMS event)
50  /*@*/;
51 void luaT_init (lua_State *L)
52  /*@modifies L @*/;
53 
54 /*@unchecked@*/
55 extern const char *const luaT_typenames[];
56 
57 #endif