comparison Python/Python-ast.c @ 36665:58a8451ff795 legacy-trunk

Avoid reinitializing the types twice.
author Martin v. Löwis <martin@v.loewis.de>
date Mon, 27 Feb 2006 00:09:50 +0000
parents 7bfbfb2ef4e2
children 6165927431d6
comparison
equal deleted inserted replaced
36664:7bfbfb2ef4e2 36665:58a8451ff795
390 390
391 static int initialized; 391 static int initialized;
392 static int init_types(void) 392 static int init_types(void)
393 { 393 {
394 if (initialized) return 1; 394 if (initialized) return 1;
395 initialized = 1;
395 mod_type = make_type("mod", &PyBaseObject_Type, NULL, 0); 396 mod_type = make_type("mod", &PyBaseObject_Type, NULL, 0);
396 Module_type = make_type("Module", mod_type, Module_fields, 1); 397 Module_type = make_type("Module", mod_type, Module_fields, 1);
397 Interactive_type = make_type("Interactive", mod_type, 398 Interactive_type = make_type("Interactive", mod_type,
398 Interactive_fields, 1); 399 Interactive_fields, 1);
399 Expression_type = make_type("Expression", mod_type, Expression_fields, 400 Expression_type = make_type("Expression", mod_type, Expression_fields,