summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorneonene <53406459+neonene@users.noreply.github.com>2024-11-13 17:09:26 (GMT)
committerGitHub <noreply@github.com>2024-11-13 17:09:26 (GMT)
commit8c9c6d3c1234e730c0beb2a6123e68fe98e57ede (patch)
treee8ee0a6d04adbea47de5f5a284996a691e80f296 /Objects
parentb2bbdc56e3276f3b37ea5cf5f73f49c4cce6d9f6 (diff)
downloadcpython-8c9c6d3c1234e730c0beb2a6123e68fe98e57ede.zip
cpython-8c9c6d3c1234e730c0beb2a6123e68fe98e57ede.tar.gz
cpython-8c9c6d3c1234e730c0beb2a6123e68fe98e57ede.tar.bz2
gh-123465: Ensure PyType_FromMetaclass avoids extra strcmp (GH-125460)
use else
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 4af7f02..a6cf3da 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -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;
}
}