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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy