mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +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
|
@ -516,7 +516,7 @@ PyObject * _PyCodec_LookupTextEncoding(const char *encoding,
|
|||
* attribute.
|
||||
*/
|
||||
if (!PyTuple_CheckExact(codec)) {
|
||||
if (_PyObject_LookupAttr(codec, &_Py_ID(_is_text_encoding), &attr) < 0) {
|
||||
if (PyObject_GetOptionalAttr(codec, &_Py_ID(_is_text_encoding), &attr) < 0) {
|
||||
Py_DECREF(codec);
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue