summaryrefslogtreecommitdiffstats
path: root/Python/pythonmain.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1990-12-20 23:11:33 (GMT)
committerGuido van Rossum <guido@python.org>1990-12-20 23:11:33 (GMT)
commit6c4f4a92ac02d2d1321ab545294078896529db2c (patch)
tree07f6257b9a114f439360f7405a04f6d58b9d15a9 /Python/pythonmain.c
parent706eea8a063e44fd7d751cb0dab3da42a6b2b03d (diff)
downloadcpython-6c4f4a92ac02d2d1321ab545294078896529db2c.zip
cpython-6c4f4a92ac02d2d1321ab545294078896529db2c.tar.gz
cpython-6c4f4a92ac02d2d1321ab545294078896529db2c.tar.bz2
Changes for THINK C 4.0.
Don't call inittime() and initmath(), let config_*.c decide about those.
Diffstat (limited to 'Python/pythonmain.c')
-rw-r--r--Python/pythonmain.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/Python/pythonmain.c b/Python/pythonmain.c
index f095cdd..031593c 100644
--- a/Python/pythonmain.c
+++ b/Python/pythonmain.c
@@ -59,19 +59,21 @@ initall()
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 @@ goaway(sts)
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 @@ finaloutput()
#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 @@ askyesno(prompt)
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. */