- In Modules/_sqlite/connection.c, use PyLong_FromLong
- In Modules/_sqlite/microprotocols.c, use PyTuple_Pack
{
if (!pysqlite_check_connection(self)) {
return NULL;
- } else {
- return Py_BuildValue("i", sqlite3_total_changes(self->db));
}
+ return PyLong_FromLong(sqlite3_total_changes(self->db));
}
static PyObject* pysqlite_connection_get_in_transaction(pysqlite_Connection* self, void* unused)
assert(type != NULL);
assert(proto != NULL);
- key = Py_BuildValue("(OO)", (PyObject*)type, proto);
+ key = PyTuple_Pack(2, (PyObject *)type, proto);
if (!key) {
return -1;
}
way to get a quotable object to be its instance */
/* look for an adapter in the registry */
- key = Py_BuildValue("(OO)", (PyObject*)Py_TYPE(obj), proto);
+ key = PyTuple_Pack(2, (PyObject *)Py_TYPE(obj), proto);
if (!key) {
return NULL;
}