diff options
author | Georg Brandl <georg@python.org> | 2006-05-29 19:39:45 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-05-29 19:39:45 (GMT) |
commit | 2cfaa34dfa2919803a7caf7cfd99aa21d6c40e06 (patch) | |
tree | 68fad69a60835e80f0ed91d3d38ea8e961efd2c3 /Modules/mmapmodule.c | |
parent | 162997efb10131868b3dd7bec63f1c89b12ec3a5 (diff) | |
download | cpython-2cfaa34dfa2919803a7caf7cfd99aa21d6c40e06.zip cpython-2cfaa34dfa2919803a7caf7cfd99aa21d6c40e06.tar.gz cpython-2cfaa34dfa2919803a7caf7cfd99aa21d6c40e06.tar.bz2 |
Correct some value converting strangenesses.
Diffstat (limited to 'Modules/mmapmodule.c')
-rw-r--r-- | Modules/mmapmodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index 2e34a9f..2e74e37 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -477,7 +477,7 @@ mmap_tell_method(mmap_object *self, PyObject *args) CHECK_VALID(NULL); if (!PyArg_ParseTuple(args, ":tell")) return NULL; - return Py_BuildValue("l", (long) self->pos); + return PyInt_FromLong((long) self->pos); } static PyObject * @@ -493,7 +493,7 @@ mmap_flush_method(mmap_object *self, PyObject *args) return NULL; } else { #ifdef MS_WINDOWS - return Py_BuildValue("l", (long) + return PyInt_FromLong((long) FlushViewOfFile(self->data+offset, size)); #endif /* MS_WINDOWS */ #ifdef UNIX @@ -505,7 +505,7 @@ mmap_flush_method(mmap_object *self, PyObject *args) PyErr_SetFromErrno(mmap_module_error); return NULL; } - return Py_BuildValue("l", (long) 0); + return PyInt_FromLong(0); #endif /* UNIX */ } } |