diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-08-02 04:15:00 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-08-02 04:15:00 (GMT) |
commit | 6d6c1a35e08b95a83dbe47dbd9e6474daff00354 (patch) | |
tree | 542089077b9c2650dcf5c52d6bfcef1baf12d176 /Python/pythonrun.c | |
parent | 52d55a392600011d3edfe85c694744ec550ad1fe (diff) | |
download | cpython-6d6c1a35e08b95a83dbe47dbd9e6474daff00354.zip cpython-6d6c1a35e08b95a83dbe47dbd9e6474daff00354.tar.gz cpython-6d6c1a35e08b95a83dbe47dbd9e6474daff00354.tar.bz2 |
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 c74b062..e616230 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'; |