diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-10-06 15:34:16 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-10-06 15:34:16 -0300 |
| commit | bd38017ddfeda738f3f1881043c0ec8bbea1adbc (patch) | |
| tree | 4fd935dbf16599661abc2d0c6be8ca8be083b678 /ltests.c | |
| parent | 652f885c30e36c3bdbecd71b70dfbf273abfe24e (diff) | |
| download | lua-bd38017ddfeda738f3f1881043c0ec8bbea1adbc.tar.gz lua-bd38017ddfeda738f3f1881043c0ec8bbea1adbc.tar.bz2 lua-bd38017ddfeda738f3f1881043c0ec8bbea1adbc.zip | |
small optimization for table size in machines with double allignment
Diffstat (limited to 'ltests.c')
| -rw-r--r-- | ltests.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.c,v 2.12 2004/09/21 16:54:32 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.13 2004/09/29 21:00:25 roberto Exp roberto $ |
| 3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -554,13 +554,13 @@ static int table_query (lua_State *L) { | |||
| 554 | if (!ttisnil(gval(gnode(t, i))) || | 554 | if (!ttisnil(gval(gnode(t, i))) || |
| 555 | ttisnil(gkey(gnode(t, i))) || | 555 | ttisnil(gkey(gnode(t, i))) || |
| 556 | ttisnumber(gkey(gnode(t, i)))) { | 556 | ttisnumber(gkey(gnode(t, i)))) { |
| 557 | luaA_pushobject(L, gkey(gnode(t, i))); | 557 | luaA_pushobject(L, key2tval(gnode(t, i))); |
| 558 | } | 558 | } |
| 559 | else | 559 | else |
| 560 | lua_pushliteral(L, "<undef>"); | 560 | lua_pushliteral(L, "<undef>"); |
| 561 | luaA_pushobject(L, gval(gnode(t, i))); | 561 | luaA_pushobject(L, gval(gnode(t, i))); |
| 562 | if (t->node[i].next) | 562 | if (gnext(&t->node[i])) |
| 563 | lua_pushinteger(L, t->node[i].next - t->node); | 563 | lua_pushinteger(L, gnext(&t->node[i]) - t->node); |
| 564 | else | 564 | else |
| 565 | lua_pushnil(L); | 565 | lua_pushnil(L); |
| 566 | } | 566 | } |
