aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-11-07 10:03:05 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-11-07 10:03:05 -0200
commitb8fed93215a23a3f443c5b0126f0de1725771b44 (patch)
tree1d7d29388b8a20fb7d0920d94b02a8040612314d /ltests.c
parent5e76a4fd313a8690d300085c4e8fcb9dca50c01a (diff)
downloadlua-b8fed93215a23a3f443c5b0126f0de1725771b44.tar.gz
lua-b8fed93215a23a3f443c5b0126f0de1725771b44.tar.bz2
lua-b8fed93215a23a3f443c5b0126f0de1725771b44.zip
New syntax for to-be-closed variables
The new syntax is <local *toclose x = f()>. The mark '*' allows other attributes to be added later without the need of new keywords; it also allows better error messages. The API function was also renamed ('lua_tobeclosed' -> 'lua_toclose').
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ltests.c b/ltests.c
index aba44b87..192ae861 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1550,8 +1550,8 @@ static struct X { int x; } x;
1550 int i = getindex; 1550 int i = getindex;
1551 return lua_yieldk(L1, nres, i, Cfunck); 1551 return lua_yieldk(L1, nres, i, Cfunck);
1552 } 1552 }
1553 else if EQ("tobeclosed") { 1553 else if EQ("toclose") {
1554 lua_tobeclosed(L); 1554 lua_toclose(L);
1555 } 1555 }
1556 else luaL_error(L, "unknown instruction %s", buff); 1556 else luaL_error(L, "unknown instruction %s", buff);
1557 } 1557 }