diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-08-02 04:15:00 +0000 |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-08-02 04:15:00 +0000 |
commit | d8f1888e1764ecb32a0d04eae72739480bffd393 (patch) | |
tree | bfab9c210304cd7f6f4ce2f050419055e638e0b9 /Python/pythonrun.c | |
parent | 9080f8aaae52e9b294b4c6e44a4b94aa26eeb627 (diff) | |
download | cpython-d8f1888e1764ecb32a0d04eae72739480bffd393.tar.gz |
Merge of descr-branch back into trunk.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index c74b0623bb..e6162305f4 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -115,6 +115,9 @@ Py_Initialize(void) Py_FatalError("Py_Initialize: can't make first thread"); (void) PyThreadState_Swap(tstate); + if (PyType_InitDict(&PyType_Type) < 0) + Py_FatalError("Py_Initialize: can't initialize 'type'"); + interp->modules = PyDict_New(); if (interp->modules == NULL) Py_FatalError("Py_Initialize: can't make modules dictionary"); @@ -144,7 +147,7 @@ Py_Initialize(void) _PyImport_Init(); /* initialize builtin exceptions */ - init_exceptions(); + _PyExc_Init(); /* phase 2 of builtins */ _PyImport_FixupExtension("__builtin__", "__builtin__"); @@ -238,7 +241,7 @@ Py_Finalize(void) below has been checked to make sure no exceptions are ever raised. */ - fini_exceptions(); + _PyExc_Fini(); /* Delete current thread */ PyInterpreterState_Clear(interp); @@ -1345,7 +1348,7 @@ _Py_AskYesNo(char *prompt) { char buf[256]; - printf("%s [ny] ", prompt); + fprintf(stderr, "%s [ny] ", prompt); if (fgets(buf, sizeof buf, stdin) == NULL) return 0; return buf[0] == 'y' || buf[0] == 'Y'; |