rpm
4.5
|
00001 /* 00002 ** $Id: ltm.h,v 1.1 2004/03/16 21:58:30 niemeyer Exp $ 00003 ** Tag methods 00004 ** See Copyright Notice in lua.h 00005 */ 00006 00007 #ifndef ltm_h 00008 #define ltm_h 00009 00010 00011 #include "lobject.h" 00012 00013 00014 /* 00015 * WARNING: if you change the order of this enumeration, 00016 * grep "ORDER TM" 00017 */ 00018 typedef enum { 00019 TM_INDEX, 00020 TM_NEWINDEX, 00021 TM_GC, 00022 TM_MODE, 00023 TM_EQ, /* last tag method with `fast' access */ 00024 TM_ADD, 00025 TM_SUB, 00026 TM_MUL, 00027 TM_DIV, 00028 TM_POW, 00029 TM_UNM, 00030 TM_LT, 00031 TM_LE, 00032 TM_CONCAT, 00033 TM_CALL, 00034 TM_N /* number of elements in the enum */ 00035 } TMS; 00036 00037 00038 00039 #define gfasttm(g,et,e) \ 00040 (((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e])) 00041 00042 #define fasttm(l,et,e) gfasttm(G(l), et, e) 00043 00044 00045 /*@observer@*/ /*@null@*/ 00046 const TObject *luaT_gettm (Table *events, TMS event, TString *ename) 00047 /*@modifies events @*/; 00048 /*@observer@*/ 00049 const TObject *luaT_gettmbyobj (lua_State *L, const TObject *o, TMS event) 00050 /*@*/; 00051 void luaT_init (lua_State *L) 00052 /*@modifies L @*/; 00053 00054 /*@unchecked@*/ 00055 extern const char *const luaT_typenames[]; 00056 00057 #endif