diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-08-06 14:06:56 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-08-06 14:06:56 -0300 |
commit | 634344d61fb4bd7ebd033d37b814a0083e55b5a2 (patch) | |
tree | 01794c51e00c7ec1faec1e08fe2963ee75b1a139 /ltm.c | |
parent | a2fa48a570b01b2a2cd37f01799f08f693fc5892 (diff) | |
download | lua-634344d61fb4bd7ebd033d37b814a0083e55b5a2.tar.gz lua-634344d61fb4bd7ebd033d37b814a0083e55b5a2.tar.bz2 lua-634344d61fb4bd7ebd033d37b814a0083e55b5a2.zip |
new API for weak mode
Diffstat (limited to 'ltm.c')
-rw-r--r-- | ltm.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltm.c,v 1.98 2002/07/17 16:25:13 roberto Exp $ | 2 | ** $Id: ltm.c,v 1.99 2002/08/05 14:09:06 roberto Exp roberto $ |
3 | ** Tag methods | 3 | ** Tag methods |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -26,7 +26,7 @@ const char *const luaT_typenames[] = { | |||
26 | void luaT_init (lua_State *L) { | 26 | void luaT_init (lua_State *L) { |
27 | static const char *const luaT_eventname[] = { /* ORDER TM */ | 27 | static const char *const luaT_eventname[] = { /* ORDER TM */ |
28 | "__index", "__newindex", | 28 | "__index", "__newindex", |
29 | "__gc", "__eq", "__mode", | 29 | "__gc", "__eq", |
30 | "__gettable", "__settable", | 30 | "__gettable", "__settable", |
31 | "__add", "__sub", "__mul", "__div", | 31 | "__add", "__sub", "__mul", "__div", |
32 | "__pow", "__unm", "__lt", "__le", | 32 | "__pow", "__unm", "__lt", "__le", |
@@ -46,7 +46,7 @@ void luaT_init (lua_State *L) { | |||
46 | */ | 46 | */ |
47 | const TObject *luaT_gettm (Table *events, TMS event, TString *ename) { | 47 | const TObject *luaT_gettm (Table *events, TMS event, TString *ename) { |
48 | const TObject *tm = luaH_getstr(events, ename); | 48 | const TObject *tm = luaH_getstr(events, ename); |
49 | lua_assert(event <= TM_MODE); | 49 | lua_assert(event <= TM_EQ); |
50 | if (ttisnil(tm)) { /* no tag method? */ | 50 | if (ttisnil(tm)) { /* no tag method? */ |
51 | events->flags |= (1u<<event); /* cache this fact */ | 51 | events->flags |= (1u<<event); /* cache this fact */ |
52 | return NULL; | 52 | return NULL; |