PyTuple_Pack is not available in Python 2.3, but ctypes must stay

compatible with that.
This commit is contained in:
Thomas Heller 2006-05-31 11:37:58 +00:00
parent 9f16dd026c
commit bd16bce81f
1 changed files with 1 additions and 1 deletions

View 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",