Skip to content

Commit

Permalink
fix file:close signature (#687)
Browse files Browse the repository at this point in the history
since Lua 5.2, when closing a file handle created with io.popen, file:close returns the same values returned by os.execute.
  • Loading branch information
fperrad authored Oct 19, 2023
1 parent ea7bfb1 commit d2bb075
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5224,7 +5224,7 @@ local function init_globals(lax)
typename = "record",
is_userdata = true,
fields = {
["close"] = a_type({ typename = "function", args = TUPLE({ NOMINAL_FILE }), rets = TUPLE({ BOOLEAN, STRING }) }),
["close"] = a_type({ typename = "function", args = TUPLE({ NOMINAL_FILE }), rets = TUPLE({ BOOLEAN, STRING, INTEGER }) }),
["flush"] = a_type({ typename = "function", args = TUPLE({ NOMINAL_FILE }), rets = TUPLE({}) }),
["lines"] = a_type({ typename = "function", args = VARARG({ NOMINAL_FILE, a_type({ typename = "union", types = { STRING, NUMBER } }) }), rets = TUPLE({
a_type({ typename = "function", args = TUPLE({}), rets = VARARG({ STRING }) }),
Expand Down
2 changes: 1 addition & 1 deletion tl.tl
Original file line number Diff line number Diff line change
Expand Up @@ -5224,7 +5224,7 @@ local function init_globals(lax: boolean): {string:Variable}, {string:Type}
typename = "record",
is_userdata = true,
fields = {
["close"] = a_type { typename = "function", args = TUPLE { NOMINAL_FILE }, rets = TUPLE { BOOLEAN, STRING} },
["close"] = a_type { typename = "function", args = TUPLE { NOMINAL_FILE }, rets = TUPLE { BOOLEAN, STRING, INTEGER } },
["flush"] = a_type { typename = "function", args = TUPLE { NOMINAL_FILE }, rets = TUPLE {} },
["lines"] = a_type { typename = "function", args = VARARG { NOMINAL_FILE, a_type { typename = "union", types = { STRING, NUMBER } } }, rets = TUPLE {
a_type { typename = "function", args = TUPLE {}, rets = VARARG { STRING } },
Expand Down

0 comments on commit d2bb075

Please sign in to comment.