comparison Python/pythonrun.c @ 83613:0b34fd75b937

Issue #17408: Avoid using an obsolete instance of the copyreg module when the interpreter is shutdown and then started again.
author Antoine Pitrou <solipsis@pitrou.net>
date Sat, 04 May 2013 20:46:19 +0200
parents e39a8f8ceb9f 8c1385205a35
children 97b7bd87c44c
comparison
equal deleted inserted replaced
83610:193f25352e1c 83613:0b34fd75b937
522 flush_std_files(); 522 flush_std_files();
523 523
524 /* Disable signal handling */ 524 /* Disable signal handling */
525 PyOS_FiniInterrupts(); 525 PyOS_FiniInterrupts();
526 526
527 /* Clear type lookup cache */
528 PyType_ClearCache();
529
530 /* Collect garbage. This may call finalizers; it's nice to call these 527 /* Collect garbage. This may call finalizers; it's nice to call these
531 * before all modules are destroyed. 528 * before all modules are destroyed.
532 * XXX If a __del__ or weakref callback is triggered here, and tries to 529 * XXX If a __del__ or weakref callback is triggered here, and tries to
533 * XXX import a module, bad things can happen, because Python no 530 * XXX import a module, bad things can happen, because Python no
534 * XXX longer believes it's initialized. 531 * XXX longer believes it's initialized.
630 PyByteArray_Fini(); 627 PyByteArray_Fini();
631 PyLong_Fini(); 628 PyLong_Fini();
632 PyFloat_Fini(); 629 PyFloat_Fini();
633 PyDict_Fini(); 630 PyDict_Fini();
634 PySlice_Fini(); 631 PySlice_Fini();
632 _PyType_Fini();
635 633
636 /* Cleanup Unicode implementation */ 634 /* Cleanup Unicode implementation */
637 _PyUnicode_Fini(); 635 _PyUnicode_Fini();
638 636
639 /* reset file system default encoding */ 637 /* reset file system default encoding */