[Python-checkins] CVS: python/dist/src/Python pythonrun.c,2.90,2.91

Guido van Rossum guido@cnri.reston.va.us
Fri, 10 Mar 2000 18:03:56 -0500 (EST)


Update of /projects/cvsroot/python/dist/src/Python
In directory eric:/home/guido/hp/mal/py-patched/Python

Modified Files:
	pythonrun.c 
Log Message:
Marc-Andre Lemburg: add calls to initialize and finalize Unicode and
Codec registry.


Index: pythonrun.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Python/pythonrun.c,v
retrieving revision 2.90
retrieving revision 2.91
diff -C2 -r2.90 -r2.91
*** pythonrun.c	2000/01/20 22:32:56	2.90
--- pythonrun.c	2000/03/10 23:03:54	2.91
***************
*** 77,80 ****
--- 77,86 ----
  #endif
  
+ extern void _PyUnicode_Init();
+ extern void _PyUnicode_Fini();
+ extern void _PyCodecRegistry_Init();
+ extern void _PyCodecRegistry_Fini();
+ 
+ 
  int Py_DebugFlag; /* Needed by parser.c */
  int Py_VerboseFlag; /* Needed by import.c */
***************
*** 138,141 ****
--- 144,153 ----
  		Py_FatalError("Py_Initialize: can't make modules dictionary");
  
+ 	/* Init codec registry */
+ 	_PyCodecRegistry_Init();
+ 
+ 	/* Init Unicode implementation; relies on the codec registry */
+ 	_PyUnicode_Init();
+ 
  	bimod = _PyBuiltin_Init_1();
  	if (bimod == NULL)
***************
*** 206,209 ****
--- 218,227 ----
  	/* Destroy PyExc_MemoryErrorInst */
  	_PyBuiltin_Fini_1();
+ 
+ 	/* Cleanup Unicode implementation */
+ 	_PyUnicode_Fini();
+ 
+ 	/* Cleanup Codec registry */
+ 	_PyCodecRegistry_Fini();
  
  	/* Destroy all modules */