summaryrefslogtreecommitdiffstats
path: root/Python/executor_cases.c.h
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2023-09-28 14:31:32 (GMT)
committerGitHub <noreply@github.com>2023-09-28 14:31:32 (GMT)
commit3814bc17230df4cd3bc4d8e2ce0ad36470fba269 (patch)
tree19ea41ddb3b437d7044f4247c17e4ae6708c71f1 /Python/executor_cases.c.h
parent9be283e5e15d5d5685b78a38eb132501f7f3febb (diff)
downloadcpython-3814bc17230df4cd3bc4d8e2ce0ad36470fba269.zip
cpython-3814bc17230df4cd3bc4d8e2ce0ad36470fba269.tar.gz
cpython-3814bc17230df4cd3bc4d8e2ce0ad36470fba269.tar.bz2
gh-110020: Fix unused variable warnings in bytecodes.c (GH-110023)
Diffstat (limited to 'Python/executor_cases.c.h')
-rw-r--r--Python/executor_cases.c.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h
index 981db69..55a03c9 100644
--- a/Python/executor_cases.c.h
+++ b/Python/executor_cases.c.h
@@ -1736,8 +1736,7 @@
case _GUARD_DORV_VALUES: {
PyObject *owner;
owner = stack_pointer[-1];
- PyTypeObject *tp = Py_TYPE(owner);
- assert(tp->tp_flags & Py_TPFLAGS_MANAGED_DICT);
+ assert(Py_TYPE(owner)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
PyDictOrValues dorv = *_PyObject_DictOrValuesPointer(owner);
DEOPT_IF(!_PyDictOrValues_IsValues(dorv), STORE_ATTR);
break;
@@ -2299,8 +2298,7 @@
case _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT: {
PyObject *owner;
owner = stack_pointer[-1];
- PyTypeObject *owner_cls = Py_TYPE(owner);
- assert(owner_cls->tp_flags & Py_TPFLAGS_MANAGED_DICT);
+ assert(Py_TYPE(owner)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
PyDictOrValues *dorv = _PyObject_DictOrValuesPointer(owner);
DEOPT_IF(!_PyDictOrValues_IsValues(*dorv) &&
!_PyObject_MakeInstanceAttributesFromDict(owner, dorv),
@@ -2345,8 +2343,7 @@
owner = stack_pointer[-1];
PyObject *descr = (PyObject *)operand;
assert(oparg & 1);
- PyTypeObject *owner_cls = Py_TYPE(owner);
- assert(owner_cls->tp_dictoffset == 0);
+ assert(Py_TYPE(owner)->tp_dictoffset == 0);
STAT_INC(LOAD_ATTR, hit);
assert(descr != NULL);
assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR));