diff Python/pythonmain.c @ 94:dac8625c8d9b legacy-trunk

Changes for THINK C 4.0. Don't call inittime() and initmath(), let config_*.c decide about those.
author Guido van Rossum <guido@python.org>
date Thu, 20 Dec 1990 23:11:33 +0000
parents a6934380c6e7
children 853b736a6a9e
line wrap: on
line diff
--- a/Python/pythonmain.c	Thu Dec 20 23:11:02 1990 +0000
+++ b/Python/pythonmain.c	Thu Dec 20 23:11:33 1990 +0000
@@ -59,19 +59,21 @@
 	
 	if (inited)
 		return;
+	inited = 1;
 	
 	initimport();
 	
+	/* Modules 'builtin' and 'sys' are initialized here,
+	   they are needed by random bits of the interpreter.
+	   All other modules are optional and should be initialized
+	   by the initcalls() of a specific configuration. */
+	
 	initbuiltin(); /* Also initializes builtin exceptions */
 	initsys();
-	inittime();
-	initmath();
 	
 	initcalls(); /* Configuration-dependent initializations */
 	
 	initintr(); /* For intrcheck() */
-	
-	inited = 1;
 }
 
 /* Parse input from a file and execute it */
@@ -340,14 +342,14 @@
 	fprintf(stderr, "[%ld refs]\n", ref_total);
 #endif
 
-#ifdef THINK_C
+#ifdef THINK_C_3_0
 	if (sts == 0)
 		Click_On(0);
 #endif
 
 #ifdef TRACE_REFS
 	if (askyesno("Print left references?")) {
-#ifdef THINK_C
+#ifdef THINK_C_3_0
 		Click_On(1);
 #endif
 		printrefs(stderr);
@@ -364,9 +366,9 @@
 #ifdef TRACE_REFS
 	if (!askyesno("Print left references?"))
 		return;
-#ifdef THINK_C
+#ifdef THINK_C_3_0
 	Click_On(1);
-#endif /* THINK_C */
+#endif
 	printrefs(stderr);
 #endif /* TRACE_REFS */
 }
@@ -385,7 +387,7 @@
 	return buf[0] == 'y' || buf[0] == 'Y';
 }
 
-#ifdef THINK_C
+#ifdef THINK_C_3_0
 
 /* Check for file descriptor connected to interactive device.
    Pretend that stdin is always interactive, other files never. */