bpo-40956: Convert _sqlite3 module level functions to Argument Clinic (GH-22484)

This commit is contained in:
Erlend Egeberg Aasland 2020-10-31 07:07:44 +01:00 committed by GitHub
parent bcbf758476
commit 7d21027157
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 313 additions and 88 deletions

View file

@ -29,7 +29,6 @@
#include "microprotocols.h"
#include "prepare_protocol.h"
/** the adapters registry **/
static PyObject *psyco_adapters = NULL;
@ -150,15 +149,3 @@ pysqlite_microprotocols_adapt(PyObject *obj, PyObject *proto, PyObject *alt)
PyErr_SetString(pysqlite_ProgrammingError, "can't adapt");
return NULL;
}
/** module-level functions **/
PyObject *
pysqlite_adapt(pysqlite_Cursor *self, PyObject *args)
{
PyObject *obj, *alt = NULL;
PyObject *proto = (PyObject*)pysqlite_PrepareProtocolType;
if (!PyArg_ParseTuple(args, "O|OO", &obj, &proto, &alt)) return NULL;
return pysqlite_microprotocols_adapt(obj, proto, alt);
}