[Python-checkins] python/dist/src/Python codecs.c,2.19,2.20
lemburg@users.sourceforge.net
lemburg@users.sourceforge.net
Fri, 14 Feb 2003 12:25:59 -0800
Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv7431/Python
Modified Files:
codecs.c
Log Message:
Patch for bug reported in patch #686627: import race condition in
codecs registry startup.
Index: codecs.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/codecs.c,v
retrieving revision 2.19
retrieving revision 2.20
diff -C2 -d -r2.19 -r2.20
*** codecs.c 21 Nov 2002 23:53:25 -0000 2.19
--- codecs.c 14 Feb 2003 20:25:56 -0000 2.20
***************
*** 39,43 ****
import_encodings_called = 1;
! mod = PyImport_ImportModule("encodings");
if (mod == NULL) {
if (PyErr_ExceptionMatches(PyExc_ImportError)) {
--- 39,43 ----
import_encodings_called = 1;
! mod = PyImport_ImportModuleEx("encodings", NULL, NULL, NULL);
if (mod == NULL) {
if (PyErr_ExceptionMatches(PyExc_ImportError)) {