diff options
| author | Erlend Egeberg Aasland <erlend.aasland@innova.no> | 2022-02-16 16:24:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-17 00:24:44 +0900 |
| commit | b2077117d125925210148294eefee28797b7ff4c (patch) | |
| tree | 882ab0be1bbfa306c6f0371220947c5fcc8ca848 /Modules/_sqlite/microprotocols.c | |
| parent | d64f3caebe8f8e31ecd193e0bd25105400153ece (diff) | |
| download | cpython-git-b2077117d125925210148294eefee28797b7ff4c.tar.gz | |
bpo-46541: Replace _Py_IDENTIFIER with _Py_ID in sqlite3 (GH-31351)
Diffstat (limited to 'Modules/_sqlite/microprotocols.c')
| -rw-r--r-- | Modules/_sqlite/microprotocols.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Modules/_sqlite/microprotocols.c b/Modules/_sqlite/microprotocols.c index 697d1a788a..a79f0067b1 100644 --- a/Modules/_sqlite/microprotocols.c +++ b/Modules/_sqlite/microprotocols.c @@ -23,8 +23,6 @@ * 3. This notice may not be removed or altered from any source distribution. */ -#define NEEDS_PY_IDENTIFIER - #include <Python.h> #include "cursor.h" @@ -76,8 +74,6 @@ PyObject * pysqlite_microprotocols_adapt(pysqlite_state *state, PyObject *obj, PyObject *proto, PyObject *alt) { - _Py_IDENTIFIER(__adapt__); - _Py_IDENTIFIER(__conform__); PyObject *adapter, *key, *adapted; /* we don't check for exact type conformance as specified in PEP 246 @@ -102,7 +98,7 @@ pysqlite_microprotocols_adapt(pysqlite_state *state, PyObject *obj, } /* try to have the protocol adapt this object */ - if (_PyObject_LookupAttrId(proto, &PyId___adapt__, &adapter) < 0) { + if (_PyObject_LookupAttr(proto, state->str___adapt__, &adapter) < 0) { return NULL; } if (adapter) { @@ -121,7 +117,7 @@ pysqlite_microprotocols_adapt(pysqlite_state *state, PyObject *obj, } /* and finally try to have the object adapt itself */ - if (_PyObject_LookupAttrId(obj, &PyId___conform__, &adapter) < 0) { + if (_PyObject_LookupAttr(obj, state->str___conform__, &adapter) < 0) { return NULL; } if (adapter) { |
