[pypy-commit] pypy default: close file once, second close will segfault win32
mattip
pypy.commits at gmail.com
Mon Nov 7 12:22:29 EST 2016
Author: Matti Picus <matti.picus at gmail.com>
Branch:
Changeset: r88188:57ee4821e42c
Date: 2016-11-07 19:20 +0200
http://bitbucket.org/pypy/pypy/changeset/57ee4821e42c/
Log: close file once, second close will segfault win32
diff --git a/pypy/module/cpyext/test/test_eval.py b/pypy/module/cpyext/test/test_eval.py
--- a/pypy/module/cpyext/test/test_eval.py
+++ b/pypy/module/cpyext/test/test_eval.py
@@ -140,9 +140,8 @@
# try again, but with a closed file
fp = c_fopen(str(filepath), "rb")
- os.close(c_fileno(fp))
+ c_fclose(fp)
api.PyRun_File(fp, filename, Py_file_input, w_globals, w_locals)
- c_fclose(fp)
assert api.PyErr_Occurred() is space.w_IOError
api.PyErr_Clear()
More information about the pypy-commit
mailing list