diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2005-09-21 06:44:25 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2005-09-21 06:44:25 (GMT) |
commit | 058bde194485ff4a0860c1dfc152763403655303 (patch) | |
tree | f6936f909f3bec6c4573d0ec3fe32b3e4c3f804b /Modules/cjkcodecs | |
parent | 2190f8c47e6383449987b8fd9e87711499dc2a10 (diff) | |
download | cpython-058bde194485ff4a0860c1dfc152763403655303.zip cpython-058bde194485ff4a0860c1dfc152763403655303.tar.gz cpython-058bde194485ff4a0860c1dfc152763403655303.tar.bz2 |
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.
Diffstat (limited to 'Modules/cjkcodecs')
-rw-r--r-- | Modules/cjkcodecs/multibytecodec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c index 4444941..7d2d15e 100644 --- a/Modules/cjkcodecs/multibytecodec.c +++ b/Modules/cjkcodecs/multibytecodec.c @@ -1265,6 +1265,10 @@ static struct PyMethodDef __methods[] = { 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()) |