diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-07-14 13:22:24 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-07-14 13:22:24 -0300 |
commit | fa0c03aaa6e7d349ba01e5e3dc028616ef2caf5a (patch) | |
tree | df34abd40945187fc33a47fd608cf17ad4d54f5e /lvm.c | |
parent | 3fa47c5dc1e72eb806feff4616e56a56513d7a39 (diff) | |
download | lua-fa0c03aaa6e7d349ba01e5e3dc028616ef2caf5a.tar.gz lua-fa0c03aaa6e7d349ba01e5e3dc028616ef2caf5a.tar.bz2 lua-fa0c03aaa6e7d349ba01e5e3dc028616ef2caf5a.zip |
details
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 2.63 2006/06/05 15:58:59 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 2.65 2006/07/14 14:40:12 roberto Exp $ |
3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -455,12 +455,12 @@ void luaV_execute (lua_State *L, int nexeccalls) { | |||
455 | continue; | 455 | continue; |
456 | } | 456 | } |
457 | case OP_NEWTABLE: { | 457 | case OP_NEWTABLE: { |
458 | int asize = luaO_fb2int(GETARG_B(i)); | 458 | int b = GETARG_B(i); |
459 | int nsize = luaO_fb2int(GETARG_C(i)); | 459 | int c = GETARG_C(i); |
460 | Table *t = luaH_new(L); | 460 | Table *t = luaH_new(L); |
461 | sethvalue(L, ra, t); | 461 | sethvalue(L, ra, t); |
462 | if (asize > 0 || nsize > 0) | 462 | if (b != 0 || c != 0) |
463 | luaH_resize(L, t, asize, nsize); | 463 | luaH_resize(L, t, luaO_fb2int(b), luaO_fb2int(c)); |
464 | Protect(luaC_checkGC(L)); | 464 | Protect(luaC_checkGC(L)); |
465 | continue; | 465 | continue; |
466 | } | 466 | } |
@@ -523,7 +523,7 @@ void luaV_execute (lua_State *L, int nexeccalls) { | |||
523 | } | 523 | } |
524 | default: { /* try metamethod */ | 524 | default: { /* try metamethod */ |
525 | Protect( | 525 | Protect( |
526 | if (!call_binTM(L, rb, luaO_nilobject, ra, TM_LEN)) | 526 | if (!call_binTM(L, rb, rb, ra, TM_LEN)) |
527 | luaG_typeerror(L, rb, "get length of"); | 527 | luaG_typeerror(L, rb, "get length of"); |
528 | ) | 528 | ) |
529 | } | 529 | } |