[Python-checkins] r42585 - in python/trunk: Parser/asdl_c.py Python/Python-ast.c

martin.v.loewis python-checkins at python.org
Mon Feb 27 01:09:53 CET 2006


Author: martin.v.loewis
Date: Mon Feb 27 01:09:50 2006
New Revision: 42585
Modified:
 python/trunk/Parser/asdl_c.py
 python/trunk/Python/Python-ast.c
Log:
Avoid reinitializing the types twice.
Modified: python/trunk/Parser/asdl_c.py
==============================================================================
--- python/trunk/Parser/asdl_c.py	(original)
+++ python/trunk/Parser/asdl_c.py	Mon Feb 27 01:09:50 2006
@@ -446,6 +446,7 @@
 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);
Modified: python/trunk/Python/Python-ast.c
==============================================================================
--- python/trunk/Python/Python-ast.c	(original)
+++ python/trunk/Python/Python-ast.c	Mon Feb 27 01:09:50 2006
@@ -392,6 +392,7 @@
 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,


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /