gh-111178: Make slot functions in typeobject.c have compatible types (GH-112752)

This commit is contained in:
Christopher Chavez 2023-12-20 08:13:44 -06:00 committed by GitHub
parent 57b7e52790
commit a545a86ec6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 21 deletions

View file

@ -1196,7 +1196,7 @@ PyObject_GetOptionalAttr(PyObject *v, PyObject *name, PyObject **result)
}
return 0;
}
if (tp->tp_getattro == (getattrofunc)_Py_type_getattro) {
if (tp->tp_getattro == _Py_type_getattro) {
int supress_missing_attribute_exception = 0;
*result = _Py_type_getattro_impl((PyTypeObject*)v, name, &supress_missing_attribute_exception);
if (supress_missing_attribute_exception) {