diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-02-26 12:48:55 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-02-26 12:48:55 -0300 |
| commit | 72d675aba78d59e22ebfadbe447f4f51ddab5a5c (patch) | |
| tree | 2f43006cba58bcfc97f01ecdd6f00e35e92aa673 /ltm.c | |
| parent | ba57f7d946bc0b600996f7a982b2fb644df76a98 (diff) | |
| download | lua-72d675aba78d59e22ebfadbe447f4f51ddab5a5c.tar.gz lua-72d675aba78d59e22ebfadbe447f4f51ddab5a5c.tar.bz2 lua-72d675aba78d59e22ebfadbe447f4f51ddab5a5c.zip | |
macros "growvector" and "reallocvector" more compact
Diffstat (limited to 'ltm.c')
| -rw-r--r-- | ltm.c | 8 |
1 files changed, 3 insertions, 5 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltm.c,v 1.22 1999/02/25 15:16:26 roberto Exp roberto $ | 2 | ** $Id: ltm.c,v 1.23 1999/02/25 19:13:56 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 | */ |
| @@ -59,8 +59,7 @@ static void init_entry (int tag) { | |||
| 59 | void luaT_init (void) { | 59 | void luaT_init (void) { |
| 60 | int t; | 60 | int t; |
| 61 | L->last_tag = -(NUM_TAGS-1); | 61 | L->last_tag = -(NUM_TAGS-1); |
| 62 | L->IMtable = luaM_growvector(L->IMtable, 0, NUM_TAGS, | 62 | luaM_growvector(L->IMtable, 0, NUM_TAGS, struct IM, arrEM, MAX_INT); |
| 63 | struct IM, memEM, MAX_INT); | ||
| 64 | for (t=L->last_tag; t<=0; t++) | 63 | for (t=L->last_tag; t<=0; t++) |
| 65 | init_entry(t); | 64 | init_entry(t); |
| 66 | } | 65 | } |
| @@ -68,8 +67,7 @@ void luaT_init (void) { | |||
| 68 | 67 | ||
| 69 | int lua_newtag (void) { | 68 | int lua_newtag (void) { |
| 70 | --L->last_tag; | 69 | --L->last_tag; |
| 71 | L->IMtable = luaM_growvector(L->IMtable, -(L->last_tag), 1, | 70 | luaM_growvector(L->IMtable, -(L->last_tag), 1, struct IM, arrEM, MAX_INT); |
| 72 | struct IM, memEM, MAX_INT); | ||
| 73 | init_entry(L->last_tag); | 71 | init_entry(L->last_tag); |
| 74 | return L->last_tag; | 72 | return L->last_tag; |
| 75 | } | 73 | } |
