mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Avoid pointless calls for std file handles on __gc.
This commit is contained in:
parent
4df40a228f
commit
b6e4ffd079
@ -354,7 +354,7 @@ LJLIB_CF(io_method_lines)
|
|||||||
LJLIB_CF(io_method___gc)
|
LJLIB_CF(io_method___gc)
|
||||||
{
|
{
|
||||||
IOFileUD *iof = io_tofilep(L);
|
IOFileUD *iof = io_tofilep(L);
|
||||||
if (iof->fp != NULL)
|
if (iof->fp != NULL && (iof->type & IOFILE_TYPE_MASK) != IOFILE_TYPE_STDF)
|
||||||
io_file_close(L, iof);
|
io_file_close(L, iof);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user