diff options
Diffstat (limited to 'ltm.c')
-rw-r--r-- | ltm.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltm.c,v 1.48 2000/09/11 19:45:27 roberto Exp roberto $ | 2 | ** $Id: ltm.c,v 1.49 2000/09/11 20:29:27 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 | */ |
@@ -77,6 +77,7 @@ static void init_entry (lua_State *L, int tag) { | |||
77 | void luaT_init (lua_State *L) { | 77 | void luaT_init (lua_State *L) { |
78 | int t; | 78 | int t; |
79 | luaM_growvector(L, L->IMtable, 0, NUM_TAGS, struct IM, "", MAX_INT); | 79 | luaM_growvector(L, L->IMtable, 0, NUM_TAGS, struct IM, "", MAX_INT); |
80 | L->nblocks += NUM_TAGS*sizeof(struct IM); | ||
80 | L->last_tag = NUM_TAGS-1; | 81 | L->last_tag = NUM_TAGS-1; |
81 | for (t=0; t<=L->last_tag; t++) | 82 | for (t=0; t<=L->last_tag; t++) |
82 | init_entry(L, t); | 83 | init_entry(L, t); |
@@ -86,6 +87,7 @@ void luaT_init (lua_State *L) { | |||
86 | int lua_newtag (lua_State *L) { | 87 | int lua_newtag (lua_State *L) { |
87 | luaM_growvector(L, L->IMtable, L->last_tag, 1, struct IM, | 88 | luaM_growvector(L, L->IMtable, L->last_tag, 1, struct IM, |
88 | "tag table overflow", MAX_INT); | 89 | "tag table overflow", MAX_INT); |
90 | L->nblocks += sizeof(struct IM); | ||
89 | L->last_tag++; | 91 | L->last_tag++; |
90 | init_entry(L, L->last_tag); | 92 | init_entry(L, L->last_tag); |
91 | return L->last_tag; | 93 | return L->last_tag; |