Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfa39a8e

Browse files
committed
address review comments
1 parent2c91bb4 commitfa39a8e

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
externvoid_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
return0;
941941
}
942942
if (tp->tp_getattro== (getattrofunc)_Py_type_getattro) {
943-
intflag=0;
944-
*result=_Py_type_getattro_impl((PyTypeObject*)v,name,&flag);
945-
if (flag) {
943+
intsupress_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
return0;
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)

[8]ページ先頭

©2009-2025 Movatter.jp