Skip to content

Commit 1050673

Browse files
cleanup
1 parent f93588a commit 1050673

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

Python/bytecodes.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1977,7 +1977,7 @@ dummy_func(
19771977
#endif /* ENABLE_SPECIALIZATION */
19781978
}
19791979

1980-
op(_LOAD_ATTR, (owner -- attr: _PyStackRef *, self_or_null if (oparg & 1))) {
1980+
op(_LOAD_ATTR, (owner -- attr[1], self_or_null if (oparg & 1))) {
19811981
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg >> 1);
19821982
if (oparg & 1) {
19831983
/* Designed to work in tandem with CALL, pushes two values. */
@@ -2004,7 +2004,8 @@ dummy_func(
20042004
}
20052005
else {
20062006
/* Classic, pushes one value. */
2007-
*attr = PyStackRef_FromPyObjectSteal(PyObject_GetAttr(PyStackRef_AsPyObjectBorrow(owner), name));
2007+
PyObject *attr_o = PyObject_GetAttr(PyStackRef_AsPyObjectBorrow(owner), name);
2008+
*attr = attr_o == NULL ? PyStackRef_NULL : PyStackRef_FromPyObjectSteal(attr_o);
20082009
DECREF_INPUTS();
20092010
ERROR_IF(PyStackRef_IsNull(*attr), error);
20102011
}

Python/executor_cases.c.h

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/generated_cases.c.h

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)