summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/include/numpy/npy_3kcompat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/core/include/numpy/npy_3kcompat.h b/numpy/core/include/numpy/npy_3kcompat.h
index 831941f12..76f10ac9e 100644
--- a/numpy/core/include/numpy/npy_3kcompat.h
+++ b/numpy/core/include/numpy/npy_3kcompat.h
@@ -178,7 +178,11 @@ npy_PyFile_Dup(PyObject *file, char *mode)
}
fd2 = PyNumber_AsSsize_t(ret, NULL);
Py_DECREF(ret);
+#ifdef _WIN32
+ return _fdopen(fd2, mode);
+#else
return fdopen(fd2, mode);
+#endif
}
#endif