summaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-11-12 14:15:50 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-11-12 14:15:50 -0200
commit5fda30b4f9f82b901113a6e666c797f835c708eb (patch)
treea8011434f8c2ccee920d955db05ba4917a00e5f8 /ltests.c
parent9eafe9c053ef17a0980ab32082bf229bd58e963b (diff)
downloadlua-5fda30b4f9f82b901113a6e666c797f835c708eb.tar.gz
lua-5fda30b4f9f82b901113a6e666c797f835c708eb.tar.bz2
lua-5fda30b4f9f82b901113a6e666c797f835c708eb.zip
'lua_toclose' gets the index to be closed as an argument
Sometimes it is useful to mark to-be-closed an index that is not at the top of the stack (e.g., if the value to be closed came from a function call returning multiple values).
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ltests.c b/ltests.c
index 192ae861..c5c1040a 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1551,7 +1551,7 @@ static struct X { int x; } x;
1551 return lua_yieldk(L1, nres, i, Cfunck); 1551 return lua_yieldk(L1, nres, i, Cfunck);
1552 } 1552 }
1553 else if EQ("toclose") { 1553 else if EQ("toclose") {
1554 lua_toclose(L); 1554 lua_toclose(L, getnum);
1555 } 1555 }
1556 else luaL_error(L, "unknown instruction %s", buff); 1556 else luaL_error(L, "unknown instruction %s", buff);
1557 } 1557 }