From: Thomas Heller Date: Wed, 31 May 2006 11:37:58 +0000 (+0000) Subject: PyTuple_Pack is not available in Python 2.3, but ctypes must stay X-Git-Tag: v2.5b1~322 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bd16bce81fa070df7d206ad4f7e8074a427e32ff;p=thirdparty%2FPython%2Fcpython.git PyTuple_Pack is not available in Python 2.3, but ctypes must stay compatible with that. --- diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 6bb0880f06df..6a2783300129 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -2185,7 +2185,7 @@ _CData_set(CDataObject *dst, PyObject *type, SETFUNC setfunc, PyObject *value, only it's object list. So we create a tuple, containing b_objects list PLUS the array itself, and return that! */ - return PyTuple_Pack(2, keep, value); + return Py_BuildValue("(OO)", keep, value); } PyErr_Format(PyExc_TypeError, "incompatible types, %s instance instead of %s instance",