Skip to content

Commit fa39a8e

Browse files
committed
address review comments
1 parent 2c91bb4 commit fa39a8e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Include/internal/pycore_typeobject.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ extern void _PyStaticType_ClearWeakRefs(PyTypeObject *type);
7575
extern void _PyStaticType_Dealloc(PyTypeObject *type);
7676

7777
PyObject *
78-
_Py_type_getattro_impl(PyTypeObject *type, PyObject *name, int *flag);
78+
_Py_type_getattro_impl(PyTypeObject *type, PyObject *name, int *supress);
7979
PyObject *
8080
_Py_type_getattro(PyTypeObject *type, PyObject *name);
8181

Objects/object.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -940,9 +940,9 @@ _PyObject_LookupAttr(PyObject *v, PyObject *name, PyObject **result)
940940
return 0;
941941
}
942942
if (tp->tp_getattro == (getattrofunc)_Py_type_getattro) {
943-
int flag = 0;
944-
*result = _Py_type_getattro_impl((PyTypeObject*)v, name, &flag);
945-
if (flag) {
943+
int supress_missing_attribute_exception = 0;
944+
*result = _Py_type_getattro_impl((PyTypeObject*)v, name, &supress_missing_attribute_exception);
945+
if (supress_missing_attribute_exception) {
946946
// return 0 without having to clear the exception
947947
return 0;
948948
}

Objects/typeobject.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -4811,7 +4811,7 @@ PyTypeObject PyType_Type = {
48114811
0, /* tp_hash */
48124812
(ternaryfunc)type_call, /* tp_call */
48134813
0, /* tp_str */
4814-
(getattrofunc)_Py_type_getattro, /* tp_getattro */
4814+
(getattrofunc)_Py_type_getattro, /* tp_getattro */
48154815
(setattrofunc)type_setattro, /* tp_setattro */
48164816
0, /* tp_as_buffer */
48174817
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |

0 commit comments

Comments
 (0)