aboutsummaryrefslogtreecommitdiff
path: root/ltm.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-02-26 12:48:55 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-02-26 12:48:55 -0300
commit72d675aba78d59e22ebfadbe447f4f51ddab5a5c (patch)
tree2f43006cba58bcfc97f01ecdd6f00e35e92aa673 /ltm.c
parentba57f7d946bc0b600996f7a982b2fb644df76a98 (diff)
downloadlua-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.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ltm.c b/ltm.c
index 4a02ac8d..d827baa1 100644
--- a/ltm.c
+++ b/ltm.c
@@ -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) {
59void luaT_init (void) { 59void 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
69int lua_newtag (void) { 68int 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}