[Python-checkins] python/dist/src/Modules bz2module.c, 1.23, 1.23.2.1
birkenfeld@users.sourceforge.net
birkenfeld at users.sourceforge.net
Fri Jun 3 21:45:55 CEST 2005
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7372/Modules
Modified Files:
Tag: release24-maint
bz2module.c
Log Message:
Backport bug #1194181: bz2.BZ2File didn't handle mode 'U' correctly.
Index: bz2module.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/bz2module.c,v
retrieving revision 1.23
retrieving revision 1.23.2.1
diff -u -d -r1.23 -r1.23.2.1
--- bz2module.c 1 Nov 2004 17:10:19 -0000 1.23
+++ bz2module.c 3 Jun 2005 19:45:52 -0000 1.23.2.1
@@ -1308,6 +1308,10 @@
break;
}
+ if (mode_char == 0) {
+ mode_char = 'r';
+ }
+
mode = (mode_char == 'r') ? "rb" : "wb";
self->file = PyObject_CallFunction((PyObject*)&PyFile_Type, "(Osi)",
More information about the Python-checkins
mailing list