Avoid pointless calls for std file handles on __gc.

This commit is contained in:
Mike Pall 2011-06-22 17:54:09 +02:00
parent 4df40a228f
commit b6e4ffd079

View File

@ -354,7 +354,7 @@ LJLIB_CF(io_method_lines)
LJLIB_CF(io_method___gc)
{
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);
return 0;
}