]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
PyTuple_Pack is not available in Python 2.3, but ctypes must stay
authorThomas Heller <theller@ctypes.org>
Wed, 31 May 2006 11:37:58 +0000 (11:37 +0000)
committerThomas Heller <theller@ctypes.org>
Wed, 31 May 2006 11:37:58 +0000 (11:37 +0000)
compatible with that.

Modules/_ctypes/_ctypes.c

index 6bb0880f06df3b5668247790c6039a807c0aa670..6a2783300129ba7fab6c6ea20bb7377ee8e9a7c2 100644 (file)
@@ -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",