diff options
Diffstat (limited to 'Python/fileutils.c')
-rw-r--r-- | Python/fileutils.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/Python/fileutils.c b/Python/fileutils.c index 97505e5bc6..1cd8ac5302 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -680,9 +680,7 @@ _Py_fstat(int fd, struct _Py_stat_struct *status) { int res; -#ifdef WITH_THREAD assert(PyGILState_Check()); -#endif Py_BEGIN_ALLOW_THREADS res = _Py_fstat_noraise(fd, status); @@ -999,10 +997,8 @@ _Py_open_impl(const char *pathname, int flags, int gil_held) int _Py_open(const char *pathname, int flags) { -#ifdef WITH_THREAD /* _Py_open() must be called with the GIL held. */ assert(PyGILState_Check()); -#endif return _Py_open_impl(pathname, flags, 1); } @@ -1095,9 +1091,7 @@ _Py_fopen_obj(PyObject *path, const char *mode) wchar_t wmode[10]; int usize; -#ifdef WITH_THREAD assert(PyGILState_Check()); -#endif if (!PyUnicode_Check(path)) { PyErr_Format(PyExc_TypeError, @@ -1125,9 +1119,7 @@ _Py_fopen_obj(PyObject *path, const char *mode) PyObject *bytes; char *path_bytes; -#ifdef WITH_THREAD assert(PyGILState_Check()); -#endif if (!PyUnicode_FSConverter(path, &bytes)) return NULL; @@ -1177,9 +1169,7 @@ _Py_read(int fd, void *buf, size_t count) int err; int async_err = 0; -#ifdef WITH_THREAD assert(PyGILState_Check()); -#endif /* _Py_read() must not be called with an exception set, otherwise the * caller may think that read() was interrupted by a signal and the signal @@ -1318,9 +1308,7 @@ _Py_write_impl(int fd, const void *buf, size_t count, int gil_held) Py_ssize_t _Py_write(int fd, const void *buf, size_t count) { -#ifdef WITH_THREAD assert(PyGILState_Check()); -#endif /* _Py_write() must not be called with an exception set, otherwise the * caller may think that write() was interrupted by a signal and the signal @@ -1471,9 +1459,7 @@ _Py_dup(int fd) DWORD ftype; #endif -#ifdef WITH_THREAD assert(PyGILState_Check()); -#endif #ifdef MS_WINDOWS _Py_BEGIN_SUPPRESS_IPH |