Skip to content

Commit cfee94e

Browse files
committed
BUG: Fix npy_PyFile_CloseFile return type.
Also make npy_PyFile_OpenFile mode argument const char*.
1 parent 737f690 commit cfee94e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

numpy/core/include/numpy/npy_3kcompat.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ npy_PyFile_Check(PyObject *file)
248248
#endif
249249

250250
static NPY_INLINE PyObject*
251-
npy_PyFile_OpenFile(PyObject *filename, char *mode)
251+
npy_PyFile_OpenFile(PyObject *filename, const char *mode)
252252
{
253253
PyObject *open;
254254
open = PyDict_GetItemString(PyEval_GetBuiltins(), "open");
@@ -258,7 +258,7 @@ npy_PyFile_OpenFile(PyObject *filename, char *mode)
258258
return PyObject_CallFunction(open, "Os", filename, mode);
259259
}
260260

261-
static NPY_INLINE PyObject*
261+
static NPY_INLINE int
262262
npy_PyFile_CloseFile(PyObject *file)
263263
{
264264
PyObject *ret;

0 commit comments

Comments
 (0)