Skip to content

Commit

Permalink
pythongh-123465: Ensure PyType_FromMetaclass avoids extra strcmp (pyt…
Browse files Browse the repository at this point in the history
…honGH-125460)

use else
  • Loading branch information
neonene authored Nov 13, 2024
1 parent b2bbdc5 commit 8c9c6d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -4761,10 +4761,10 @@ PyType_FromMetaclass(
if (strcmp(memb->name, "__weaklistoffset__") == 0) {
weaklistoffset_member = memb;
}
if (strcmp(memb->name, "__dictoffset__") == 0) {
else if (strcmp(memb->name, "__dictoffset__") == 0) {
dictoffset_member = memb;
}
if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
vectorcalloffset_member = memb;
}
}
Expand Down

0 comments on commit 8c9c6d3

Please sign in to comment.