Skip to content

Commit 6553778

Browse files
itamaroStanFromIreland
authored andcommitted
pythongh-140641: Break out of inittab search on match (pythonGH-140642)
1 parent 11d114e commit 6553778

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Python/import.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2358,6 +2358,7 @@ create_builtin(PyThreadState *tstate, PyObject *name, PyObject *spec)
23582358
for (struct _inittab *p = INITTAB; p->name != NULL; p++) {
23592359
if (_PyUnicode_EqualToASCIIString(info.name, p->name)) {
23602360
found = p;
2361+
break;
23612362
}
23622363
}
23632364
if (found == NULL) {

0 commit comments

Comments
 (0)