mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-12 12:50:28 +00:00
skip unnecessary strcmp in create_builtin
This commit is contained in:
parent
f242ef4a09
commit
e44528ee86
1 changed files with 25 additions and 27 deletions
6
third_party/python/Python/import.c
vendored
6
third_party/python/Python/import.c
vendored
|
@ -95,8 +95,8 @@ module _imp
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const char *name;
|
const char *name;
|
||||||
union {
|
union {
|
||||||
struct _inittab *tab;
|
const struct _inittab *tab;
|
||||||
struct _frozen *frz;
|
const struct _frozen *frz;
|
||||||
};
|
};
|
||||||
} initentry;
|
} initentry;
|
||||||
|
|
||||||
|
@ -1183,7 +1183,6 @@ _imp_create_builtin(PyObject *module, PyObject *spec)
|
||||||
if (res != NULL) {
|
if (res != NULL) {
|
||||||
p = res->tab;
|
p = res->tab;
|
||||||
PyModuleDef *def;
|
PyModuleDef *def;
|
||||||
if (_PyUnicode_EqualToASCIIString(name, p->name)) {
|
|
||||||
if (p->initfunc == NULL) {
|
if (p->initfunc == NULL) {
|
||||||
/* Cannot re-init internal module ("sys" or "builtins") */
|
/* Cannot re-init internal module ("sys" or "builtins") */
|
||||||
mod = PyImport_AddModule(namestr);
|
mod = PyImport_AddModule(namestr);
|
||||||
|
@ -1214,7 +1213,6 @@ _imp_create_builtin(PyObject *module, PyObject *spec)
|
||||||
return mod;
|
return mod;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Py_DECREF(name);
|
Py_DECREF(name);
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue