[Python-checkins] python/dist/src/Modules/cjkcodecs multibytecodec.c, 1.3, 1.4

nnorwitz@users.sourceforge.net nnorwitz at users.sourceforge.net
Wed Sep 21 08:44:29 CEST 2005


Update of /cvsroot/python/python/dist/src/Modules/cjkcodecs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31553/Modules/cjkcodecs

Modified Files:
	multibytecodec.c 
Log Message:
SF Patch #1297028, cjkcodecs does not initialize type pointer

Fix segfault.  I tried to write a test, but it wouldn't crash
when running regrtest.  This really should have some sort of test.

Should definitely be backported.


Index: multibytecodec.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/cjkcodecs/multibytecodec.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- multibytecodec.c	19 Aug 2004 17:49:56 -0000	1.3
+++ multibytecodec.c	21 Sep 2005 06:44:25 -0000	1.4
@@ -1265,6 +1265,10 @@
 void
 init_multibytecodec(void)
 {
+	MultibyteCodec_Type.ob_type = &PyType_Type;
+	MultibyteStreamReader_Type.ob_type = &PyType_Type;
+	MultibyteStreamWriter_Type.ob_type = &PyType_Type;
+
 	Py_InitModule("_multibytecodec", __methods);
 
 	if (PyErr_Occurred())



More information about the Python-checkins mailing list