Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add back METHOD to the switch-case to avoid warnings
  • Loading branch information
Fidget-Spinner committed Jun 7, 2022
commit 20b3352d3516305fefd92ba0b95f077e43d60600
13 changes: 6 additions & 7 deletions Python/specialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,19 +679,18 @@ _Py_Specialize_LoadAttr(PyObject *owner, _Py_CODEUNIT *instr, PyObject *name)
PyObject *descr = NULL;
DescriptorClassification kind = analyze_descriptor(type, name, &descr, 0);
assert(descr != NULL || kind == ABSENT || kind == GETSET_OVERRIDDEN);
if (kind == METHOD) {
if (oparg & 1) {
if (specialize_attr_loadmethod(owner, instr, name, descr, kind)) {
goto success;
}
if ((oparg & 1) && kind == METHOD) {
if (specialize_attr_loadmethod(owner, instr, name, descr, kind)) {
Comment thread
Fidget-Spinner marked this conversation as resolved.
Outdated
goto success;
}
SPECIALIZATION_FAIL(LOAD_ATTR, SPEC_FAIL_ATTR_METHOD);
goto fail;
}
switch(kind) {
case OVERRIDING:
SPECIALIZATION_FAIL(LOAD_ATTR, SPEC_FAIL_ATTR_OVERRIDING_DESCRIPTOR);
goto fail;
case METHOD:
SPECIALIZATION_FAIL(LOAD_ATTR, SPEC_FAIL_ATTR_METHOD);
goto fail;
case PROPERTY:
SPECIALIZATION_FAIL(LOAD_ATTR, SPEC_FAIL_ATTR_PROPERTY);
goto fail;
Expand Down