aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-01-29 15:17:26 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-01-29 15:17:26 -0200
commit6b71a9cfe53040aa605f5d75c58a2124d03f8912 (patch)
treeadbd5eb607941b3fbf2eb36359b15841de4159ae /lapi.c
parentfa8c44b510c6b56a290c14bd5dba4c7caec53284 (diff)
downloadlua-6b71a9cfe53040aa605f5d75c58a2124d03f8912.tar.gz
lua-6b71a9cfe53040aa605f5d75c58a2124d03f8912.tar.bz2
lua-6b71a9cfe53040aa605f5d75c58a2124d03f8912.zip
smaller tables for machines with 8-bit alignment
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lapi.c b/lapi.c
index 26563daf..614d237e 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 1.120 2001/01/25 16:45:36 roberto Exp roberto $ 2** $Id: lapi.c,v 1.121 2001/01/26 11:45:51 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -646,7 +646,7 @@ LUA_API int lua_next (lua_State *L, int index) {
646 lua_assert(ttype(t) == LUA_TTABLE); 646 lua_assert(ttype(t) == LUA_TTABLE);
647 n = luaH_next(L, hvalue(t), luaA_index(L, -1)); 647 n = luaH_next(L, hvalue(t), luaA_index(L, -1));
648 if (n) { 648 if (n) {
649 setobj(L->top-1, key(n)); 649 setkey2obj(L->top-1, n);
650 setobj(L->top, val(n)); 650 setobj(L->top, val(n));
651 api_incr_top(L); 651 api_incr_top(L);
652 more = 1; 652 more = 1;
@@ -674,10 +674,10 @@ LUA_API int lua_getn (lua_State *L, int index) {
674 int i = h->size; 674 int i = h->size;
675 Node *nd = h->node; 675 Node *nd = h->node;
676 while (i--) { 676 while (i--) {
677 if (ttype(key(nd)) == LUA_TNUMBER && 677 if (ttype_key(nd) == LUA_TNUMBER &&
678 ttype(val(nd)) != LUA_TNIL && 678 ttype(val(nd)) != LUA_TNIL &&
679 nvalue(key(nd)) > max) 679 nvalue_key(nd) > max)
680 max = nvalue(key(nd)); 680 max = nvalue_key(nd);
681 nd++; 681 nd++;
682 } 682 }
683 n = (int)max; 683 n = (int)max;