mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-106521: Remove _PyObject_LookupAttr() function (GH-106642)
This commit is contained in:
parent
e8ab0096a5
commit
be1b968dc1
45 changed files with 351 additions and 352 deletions
|
@ -98,7 +98,7 @@ pysqlite_microprotocols_adapt(pysqlite_state *state, PyObject *obj,
|
|||
}
|
||||
|
||||
/* try to have the protocol adapt this object */
|
||||
if (_PyObject_LookupAttr(proto, state->str___adapt__, &adapter) < 0) {
|
||||
if (PyObject_GetOptionalAttr(proto, state->str___adapt__, &adapter) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
if (adapter) {
|
||||
|
@ -117,7 +117,7 @@ pysqlite_microprotocols_adapt(pysqlite_state *state, PyObject *obj,
|
|||
}
|
||||
|
||||
/* and finally try to have the object adapt itself */
|
||||
if (_PyObject_LookupAttr(obj, state->str___conform__, &adapter) < 0) {
|
||||
if (PyObject_GetOptionalAttr(obj, state->str___conform__, &adapter) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
if (adapter) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue