diff options
author | cgohlke <cgohlke@uci.edu> | 2012-07-12 20:57:02 -0700 |
---|---|---|
committer | cgohlke <cgohlke@uci.edu> | 2012-07-12 20:57:02 -0700 |
commit | 2ee97d6014b4c1c2b33a02bdcf99cd1e15808360 (patch) | |
tree | 0b06058e4a07ecfc41515fe83510635704aec81f /numpy | |
parent | 7a060fe503f52e8b042393a5c1f6fdda7329a787 (diff) | |
download | numpy-2ee97d6014b4c1c2b33a02bdcf99cd1e15808360.tar.gz |
Use npy_ftell and npy_fseek
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/include/numpy/npy_3kcompat.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/core/include/numpy/npy_3kcompat.h b/numpy/core/include/numpy/npy_3kcompat.h index d3d5404f5..7bc94ebc8 100644 --- a/numpy/core/include/numpy/npy_3kcompat.h +++ b/numpy/core/include/numpy/npy_3kcompat.h @@ -204,7 +204,7 @@ npy_PyFile_Dup(PyObject *file, char *mode) fclose(handle); return NULL; } - fseek(handle, pos, SEEK_SET); + npy_fseek(handle, pos, SEEK_SET); return handle; } @@ -215,11 +215,11 @@ static NPY_INLINE int npy_PyFile_DupClose(PyObject *file, FILE* handle) { PyObject *ret; - long position; - position = ftell(handle); + Py_ssize_t position; + position = npy_ftell(handle); fclose(handle); - ret = PyObject_CallMethod(file, "seek", "li", position, 0); + ret = PyObject_CallMethod(file, "seek", NPY_SSIZE_T_PYFMT "i", position, 0); if (ret == NULL) { return -1; } |