mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +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
|
@ -446,6 +446,7 @@ static PyObject* ast2obj_bool(bool b)
|
|||
self.emit("static int init_types(void)",0)
|
||||
self.emit("{", 0)
|
||||
self.emit("if (initialized) return 1;", 1)
|
||||
self.emit("initialized = 1;", 1)
|
||||
for dfn in mod.dfns:
|
||||
self.visit(dfn)
|
||||
self.emit("return 1;", 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue