diff options
Diffstat (limited to 'ltm.c')
-rw-r--r-- | ltm.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltm.c,v 1.57 2000/11/30 18:50:47 roberto Exp roberto $ | 2 | ** $Id: ltm.c,v 1.58 2000/12/26 18:46:09 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 | */ |
@@ -75,9 +75,8 @@ static void init_entry (lua_State *L, int tag) { | |||
75 | 75 | ||
76 | void luaT_init (lua_State *L) { | 76 | void luaT_init (lua_State *L) { |
77 | int t; | 77 | int t; |
78 | L->TMtable = luaM_newvector(L, NUM_TAGS+2, struct TM); | ||
78 | L->sizeTM = NUM_TAGS+2; | 79 | L->sizeTM = NUM_TAGS+2; |
79 | L->TMtable = luaM_newvector(L, L->sizeTM, struct TM); | ||
80 | L->nblocks += NUM_TAGS*sizeof(struct TM); | ||
81 | L->ntag = NUM_TAGS; | 80 | L->ntag = NUM_TAGS; |
82 | for (t=0; t<L->ntag; t++) | 81 | for (t=0; t<L->ntag; t++) |
83 | init_entry(L, t); | 82 | init_entry(L, t); |
@@ -87,7 +86,6 @@ void luaT_init (lua_State *L) { | |||
87 | LUA_API int lua_newtag (lua_State *L) { | 86 | LUA_API int lua_newtag (lua_State *L) { |
88 | luaM_growvector(L, L->TMtable, L->ntag, L->sizeTM, struct TM, | 87 | luaM_growvector(L, L->TMtable, L->ntag, L->sizeTM, struct TM, |
89 | MAX_INT, "tag table overflow"); | 88 | MAX_INT, "tag table overflow"); |
90 | L->nblocks += sizeof(struct TM); | ||
91 | init_entry(L, L->ntag); | 89 | init_entry(L, L->ntag); |
92 | return L->ntag++; | 90 | return L->ntag++; |
93 | } | 91 | } |