Mercurial > vba-clojure
annotate src/lua/ltm.h @ 467:ac0ed5c1a1c4
working on drums.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Fri, 04 May 2012 05:17:18 -0500 |
parents | 27763b933818 |
children |
rev | line source |
---|---|
rlm@1 | 1 /* |
rlm@1 | 2 ** $Id: ltm.h,v 2.6.1.1 2007/12/27 13:02:25 roberto Exp $ |
rlm@1 | 3 ** Tag methods |
rlm@1 | 4 ** See Copyright Notice in lua.h |
rlm@1 | 5 */ |
rlm@1 | 6 |
rlm@1 | 7 #ifndef ltm_h |
rlm@1 | 8 #define ltm_h |
rlm@1 | 9 |
rlm@1 | 10 |
rlm@1 | 11 #include "lobject.h" |
rlm@1 | 12 |
rlm@1 | 13 |
rlm@1 | 14 /* |
rlm@1 | 15 * WARNING: if you change the order of this enumeration, |
rlm@1 | 16 * grep "ORDER TM" |
rlm@1 | 17 */ |
rlm@1 | 18 typedef enum { |
rlm@1 | 19 TM_INDEX, |
rlm@1 | 20 TM_NEWINDEX, |
rlm@1 | 21 TM_GC, |
rlm@1 | 22 TM_MODE, |
rlm@1 | 23 TM_EQ, /* last tag method with `fast' access */ |
rlm@1 | 24 TM_ADD, |
rlm@1 | 25 TM_SUB, |
rlm@1 | 26 TM_MUL, |
rlm@1 | 27 TM_DIV, |
rlm@1 | 28 TM_MOD, |
rlm@1 | 29 TM_POW, |
rlm@1 | 30 TM_UNM, |
rlm@1 | 31 TM_LEN, |
rlm@1 | 32 TM_LT, |
rlm@1 | 33 TM_LE, |
rlm@1 | 34 TM_CONCAT, |
rlm@1 | 35 TM_CALL, |
rlm@1 | 36 TM_N /* number of elements in the enum */ |
rlm@1 | 37 } TMS; |
rlm@1 | 38 |
rlm@1 | 39 |
rlm@1 | 40 |
rlm@1 | 41 #define gfasttm(g,et,e) ((et) == NULL ? NULL : \ |
rlm@1 | 42 ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e])) |
rlm@1 | 43 |
rlm@1 | 44 #define fasttm(l,et,e) gfasttm(G(l), et, e) |
rlm@1 | 45 |
rlm@1 | 46 LUAI_DATA const char *const luaT_typenames[]; |
rlm@1 | 47 |
rlm@1 | 48 |
rlm@1 | 49 LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename); |
rlm@1 | 50 LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, |
rlm@1 | 51 TMS event); |
rlm@1 | 52 LUAI_FUNC void luaT_init (lua_State *L); |
rlm@1 | 53 |
rlm@1 | 54 #endif |