summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/binascii.c2
-rw-r--r--Modules/mmapmodule.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/Modules/binascii.c b/Modules/binascii.c
index 4623b7c..71a9624 100644
--- a/Modules/binascii.c
+++ b/Modules/binascii.c
@@ -644,7 +644,7 @@ binascii_rledecode_hqx(PyObject *self, PyObject *args)
/* Empty string is a special case */
if ( in_len == 0 )
- return Py_BuildValue("s", "");
+ return PyString_FromString("");
/* Allocate a buffer of reasonable size. Resized when needed */
out_len = in_len*2;
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 */
}
}