[Python-checkins] r45620 - python/trunk/Modules/cjkcodecs/multibytecodec.c (original) (raw)
hyeshik.chang python-checkins at python.org
Fri Apr 21 18:28:35 CEST 2006
- Previous message: [Python-checkins] r45618 - python/trunk/Doc/lib/libcodecs.tex
- Next message: [Python-checkins] r45621 - python/trunk/Doc/lib/libcodecs.tex
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: hyeshik.chang Date: Fri Apr 21 18:28:34 2006 New Revision: 45620
Modified: python/trunk/Modules/cjkcodecs/multibytecodec.c Log: Backport p3yk r45619:
Add empty init methods for stateful multibytecodec instances. This resolves a problem found by Thomas Wouters: http://mail.python.org/pipermail/python-dev/2006-April/064051.html
Modified: python/trunk/Modules/cjkcodecs/multibytecodec.c
--- python/trunk/Modules/cjkcodecs/multibytecodec.c (original) +++ python/trunk/Modules/cjkcodecs/multibytecodec.c Fri Apr 21 18:28:34 2006 @@ -927,6 +927,12 @@ }
static int +mbiencoder_init(PyObject *self, PyObject *args, PyObject *kwds) +{ + return 0; +} + +static int mbiencoder_traverse(MultibyteIncrementalEncoderObject *self, visitproc visit, void arg) { @@ -982,7 +988,7 @@ 0, / tp_descr_get / 0, / tp_descr_set / 0, / tp_dictoffset / - 0, / tp_init / + mbiencoder_init, / tp_init / 0, / tp_alloc / mbiencoder_new, / tp_new */ }; @@ -1122,6 +1128,12 @@ }
static int +mbidecoder_init(PyObject *self, PyObject *args, PyObject *kwds) +{ + return 0; +} + +static int mbidecoder_traverse(MultibyteIncrementalDecoderObject *self, visitproc visit, void arg) { @@ -1177,7 +1189,7 @@ 0, / tp_descr_get / 0, / tp_descr_set / 0, / tp_dictoffset / - 0, / tp_init / + mbidecoder_init, / tp_init / 0, / tp_alloc / mbidecoder_new, / tp_new */ }; @@ -1427,6 +1439,12 @@ }
static int +mbstreamreader_init(PyObject *self, PyObject *args, PyObject *kwds) +{ + return 0; +} + +static int mbstreamreader_traverse(MultibyteStreamReaderObject *self, visitproc visit, void arg) { @@ -1484,7 +1502,7 @@ 0, / tp_descr_get / 0, / tp_descr_set / 0, / tp_dictoffset / - 0, / tp_init / + mbstreamreader_init, / tp_init / 0, / tp_alloc / mbstreamreader_new, / tp_new */ }; @@ -1632,6 +1650,12 @@ }
static int +mbstreamwriter_init(PyObject *self, PyObject *args, PyObject *kwds) +{ + return 0; +} + +static int mbstreamwriter_traverse(MultibyteStreamWriterObject *self, visitproc visit, void arg) { @@ -1706,7 +1730,7 @@ 0, / tp_descr_get / 0, / tp_descr_set / 0, / tp_dictoffset / - 0, / tp_init / + mbstreamwriter_init, / tp_init / 0, / tp_alloc / mbstreamwriter_new, / tp_new */ };
- Previous message: [Python-checkins] r45618 - python/trunk/Doc/lib/libcodecs.tex
- Next message: [Python-checkins] r45621 - python/trunk/Doc/lib/libcodecs.tex
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]