return NULL;
}
- ret = Py_BuildValue("(OO)", q, r);
+ ret = PyTuple_Pack(2, q, r);
Py_DECREF(r);
Py_DECREF(q);
return ret;
return NULL;
}
- ret = Py_BuildValue("(OO)", q, r);
+ ret = PyTuple_Pack(2, q, r);
Py_DECREF(r);
Py_DECREF(q);
return ret;
/* convert scalar to list */
if (ndim == 0) {
- items = Py_BuildValue("(O)", items);
+ items = PyTuple_Pack(1, items);
if (items == NULL)
return NULL;
}
PyTypeObject *cls = &BasicStaticTypes[num_basic_static_types_used++];
if (base != NULL) {
- cls->tp_bases = Py_BuildValue("(O)", base);
+ cls->tp_bases = PyTuple_Pack(1, base);
if (cls->tp_bases == NULL) {
return NULL;
}
static PyObject *
ipowType_ipow(PyObject *self, PyObject *other, PyObject *mod)
{
- return Py_BuildValue("OO", other, mod);
+ return PyTuple_Pack(2, other, mod);
}
static PyNumberMethods ipowType_as_number = {
PyObject *arg)
/*[clinic end generated code: output=fe7e49d96cbb7718 input=d1b83d3b853af6d9]*/
{
- return Py_BuildValue("(OO)", cls, arg);
+ return PyTuple_Pack(2, cls, arg);
}
static struct PyMethodDef test_class_methods[] = {
if (tail == NULL) {
goto exit;
}
- result = Py_BuildValue("(OOO)", drv, root, tail);
+ result = PyTuple_Pack(3, drv, root, tail);
exit:
PyMem_Free(buffer);
Py_XDECREF(drv);
PyObject *exc_type = get_exc_type(exc_value);
PyObject *exc_traceback = get_exc_traceback(exc_value);
- return Py_BuildValue(
- "(OOO)",
+ return PyTuple_Pack(
+ 3,
exc_type ? exc_type : Py_None,
exc_value ? exc_value : Py_None,
exc_traceback ? exc_traceback : Py_None);