a small optimization
This commit is contained in:
17
ltm.h
17
ltm.h
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: ltm.h,v 1.19 2000/12/26 18:46:09 roberto Exp roberto $
|
||||
** $Id: ltm.h,v 1.20 2001/01/19 13:20:30 roberto Exp roberto $
|
||||
** Tag methods
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@@ -35,6 +35,21 @@ typedef enum {
|
||||
} TMS;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** masks for allowable tag methods
|
||||
*/
|
||||
#define HAS_TM_GETGLOBAL(L,t) (1<<(t) & ((1<<LUA_TUSERDATA) | \
|
||||
(1<<LUA_TTABLE) | \
|
||||
(1<<LUA_TNIL)))
|
||||
|
||||
#define HAS_TM_SETGLOBAL(L,t) (1<<(t) & ((1<<LUA_TUSERDATA) | \
|
||||
(1<<LUA_TTABLE) | \
|
||||
(1<<LUA_TNIL) | \
|
||||
(1<<LUA_TFUNCTION)))
|
||||
|
||||
|
||||
|
||||
struct TM {
|
||||
Closure *method[TM_N];
|
||||
TString *collected; /* list of garbage-collected udata with this tag */
|
||||
|
||||
Reference in New Issue
Block a user