Added a '__close' metamethod to file handles

This commit is contained in:
Roberto Ierusalimschy
2018-10-23 13:57:25 -03:00
parent ea1322ef54
commit 0a9aca56ca
2 changed files with 36 additions and 22 deletions

View File

@@ -743,6 +743,7 @@ static const luaL_Reg flib[] = {
{"setvbuf", f_setvbuf},
{"write", f_write},
{"__gc", f_gc},
{"__close", f_gc},
{"__tostring", f_tostring},
{NULL, NULL}
};