mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
upgrade to final version of pysqlite 2.2.0
This commit is contained in:
parent
c48c8db110
commit
8e7b490890
11 changed files with 30 additions and 38 deletions
|
@ -55,28 +55,19 @@ int
|
|||
microprotocols_add(PyTypeObject *type, PyObject *proto, PyObject *cast)
|
||||
{
|
||||
PyObject* key;
|
||||
int rc;
|
||||
|
||||
if (proto == NULL) proto = (PyObject*)&SQLitePrepareProtocolType;
|
||||
|
||||
/*
|
||||
Dprintf("microprotocols_add: cast %p for (%s, ?)",
|
||||
cast, type->tp_name);
|
||||
*/
|
||||
|
||||
|
||||
key = Py_BuildValue("(OO)", (PyObject*)type, proto);
|
||||
if (!key) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (PyDict_SetItem(psyco_adapters, key, cast) != 0) {
|
||||
Py_DECREF(key);
|
||||
return -1;
|
||||
}
|
||||
|
||||
rc = PyDict_SetItem(psyco_adapters, key, cast);
|
||||
Py_DECREF(key);
|
||||
|
||||
return 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* microprotocols_adapt - adapt an object to the built-in protocol */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue