diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-11-12 14:15:50 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-11-12 14:15:50 -0200 |
| commit | 5fda30b4f9f82b901113a6e666c797f835c708eb (patch) | |
| tree | a8011434f8c2ccee920d955db05ba4917a00e5f8 /ltests.c | |
| parent | 9eafe9c053ef17a0980ab32082bf229bd58e963b (diff) | |
| download | lua-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -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 | } |
