[pypy-commit] pypy default: 64-bit fix.
arigo
noreply at buildbot.pypy.org
Sun Jun 5 15:37:09 CEST 2011
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r44718:a6d4c2abd51f
Date: 2011-06-05 15:37 +0200
http://bitbucket.org/pypy/pypy/changeset/a6d4c2abd51f/
Log: 64-bit fix.
diff --git a/pypy/module/_multibytecodec/c_codecs.py b/pypy/module/_multibytecodec/c_codecs.py
--- a/pypy/module/_multibytecodec/c_codecs.py
+++ b/pypy/module/_multibytecodec/c_codecs.py
@@ -143,10 +143,10 @@
raise RuntimeError
#
if errors == "ignore":
- pypy_cjk_dec_inbuf_add(decodebuf, esize, 0)
+ pypy_cjk_dec_inbuf_add(decodebuf, esize, rffi.cast(rffi.INT, 0))
return # continue decoding
if errors == "replace":
- e = pypy_cjk_dec_inbuf_add(decodebuf, esize, 1)
+ e = pypy_cjk_dec_inbuf_add(decodebuf, esize, rffi.cast(rffi.INT, 1))
if rffi.cast(lltype.Signed, e) == MBERR_NOMEMORY:
raise MemoryError
return # continue decoding
@@ -221,10 +221,10 @@
raise RuntimeError
#
if errors == 'ignore':
- pypy_cjk_enc_inbuf_add(encodebuf, esize, 0)
+ pypy_cjk_enc_inbuf_add(encodebuf, esize, rffi.cast(rffi.INT, 0))
return # continue encoding
if errors == "replace":
- e = pypy_cjk_enc_inbuf_add(encodebuf, esize, 1)
+ e = pypy_cjk_enc_inbuf_add(encodebuf, esize, rffi.cast(rffi.INT, 1))
if rffi.cast(lltype.Signed, e) == MBERR_NOMEMORY:
raise MemoryError
return # continue decoding
More information about the pypy-commit
mailing list