diff options
author | Hye-Shik Chang <hyeshik@gmail.com> | 2004-08-19 17:49:56 (GMT) |
---|---|---|
committer | Hye-Shik Chang <hyeshik@gmail.com> | 2004-08-19 17:49:56 (GMT) |
commit | f5a149a6b60fbea17177a1a015dc6d3f0fc24490 (patch) | |
tree | 7bce3487c476b1fcc8f394eae7b17689072a233a /Modules/cjkcodecs/multibytecodec.c | |
parent | 026f8dc103da360b4edea5128f3939a6b660e2f2 (diff) | |
download | cpython-f5a149a6b60fbea17177a1a015dc6d3f0fc24490.zip cpython-f5a149a6b60fbea17177a1a015dc6d3f0fc24490.tar.gz cpython-f5a149a6b60fbea17177a1a015dc6d3f0fc24490.tar.bz2 |
Bug #1005737, #1007249: Fix several build problems and warnings
found on legacy C compilers of HP-UX, IRIX and Tru64. (Reported
by roadkill, Richard Townsend, Maik Hertha and Minsik Kim)
Diffstat (limited to 'Modules/cjkcodecs/multibytecodec.c')
-rw-r--r-- | Modules/cjkcodecs/multibytecodec.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c index 58b16a3..4444941 100644 --- a/Modules/cjkcodecs/multibytecodec.c +++ b/Modules/cjkcodecs/multibytecodec.c @@ -2,7 +2,7 @@ * multibytecodec.c: Common Multibyte Codec Implementation * * Written by Hye-Shik Chang <perky@FreeBSD.org> - * $CJKCodecs: multibytecodec.c,v 1.12 2004/06/27 19:24:13 perky Exp $ + * $CJKCodecs: multibytecodec.c,v 1.13 2004/08/19 16:57:19 perky Exp $ */ #include "Python.h" @@ -338,7 +338,7 @@ multibytecodec_decerror(MultibyteCodec *codec, /* use cached exception object if available */ if (buf->excobj == NULL) { buf->excobj = PyUnicodeDecodeError_Create(codec->encoding, - buf->inbuf_top, + (const char *)buf->inbuf_top, (int)(buf->inbuf_end - buf->inbuf_top), start, end, reason); if (buf->excobj == NULL) @@ -965,7 +965,7 @@ mbstreamwriter_iwrite(MultibyteStreamWriterObject *self, PyObject *unistr) { PyObject *wr, *ucvt, *r = NULL; - Py_UNICODE *inbuf, *inbuf_end, *data, *inbuf_tmp = NULL; + Py_UNICODE *inbuf, *inbuf_end, *inbuf_tmp = NULL; int datalen; if (PyUnicode_Check(unistr)) @@ -982,7 +982,6 @@ mbstreamwriter_iwrite(MultibyteStreamWriterObject *self, } } - data = PyUnicode_AS_UNICODE(unistr); datalen = PyUnicode_GET_SIZE(unistr); if (datalen == 0) { Py_XDECREF(ucvt); |