mirror of
https://github.com/python/cpython.git
synced 2025-07-10 04:45:36 +00:00
Avoid reinitializing the types twice.
This commit is contained in:
parent
8d0701daf1
commit
d3a5f53a27
2 changed files with 2 additions and 0 deletions
|
@ -392,6 +392,7 @@ static int initialized;
|
|||
static int init_types(void)
|
||||
{
|
||||
if (initialized) return 1;
|
||||
initialized = 1;
|
||||
mod_type = make_type("mod", &PyBaseObject_Type, NULL, 0);
|
||||
Module_type = make_type("Module", mod_type, Module_fields, 1);
|
||||
Interactive_type = make_type("Interactive", mod_type,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue