diff options
author | Mike Pall <mike> | 2011-06-22 17:54:09 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2011-06-22 17:54:09 +0200 |
commit | b6e4ffd079750937c3788ce1abc9ee18a2a2f839 (patch) | |
tree | 40b265dd9dfe98377ea5023b7b843fd27559017b /src | |
parent | 4df40a228fe2d7aabf75aa5f75af66eec15e03c5 (diff) | |
download | luajit-b6e4ffd079750937c3788ce1abc9ee18a2a2f839.tar.gz luajit-b6e4ffd079750937c3788ce1abc9ee18a2a2f839.tar.bz2 luajit-b6e4ffd079750937c3788ce1abc9ee18a2a2f839.zip |
Avoid pointless calls for std file handles on __gc.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib_io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib_io.c b/src/lib_io.c index f4888c1c..7a59cc4f 100644 --- a/src/lib_io.c +++ b/src/lib_io.c | |||
@@ -354,7 +354,7 @@ LJLIB_CF(io_method_lines) | |||
354 | LJLIB_CF(io_method___gc) | 354 | LJLIB_CF(io_method___gc) |
355 | { | 355 | { |
356 | IOFileUD *iof = io_tofilep(L); | 356 | IOFileUD *iof = io_tofilep(L); |
357 | if (iof->fp != NULL) | 357 | if (iof->fp != NULL && (iof->type & IOFILE_TYPE_MASK) != IOFILE_TYPE_STDF) |
358 | io_file_close(L, iof); | 358 | io_file_close(L, iof); |
359 | return 0; | 359 | return 0; |
360 | } | 360 | } |