[pypy-commit] pypy default: fix translation
mattip
pypy.commits at gmail.com
Mon Jun 25 17:51:18 EDT 2018
Author: Matti Picus <matti.picus at gmail.com>
Branch:
Changeset: r94779:5eb961f7541c
Date: 2018-06-25 14:50 -0700
http://bitbucket.org/pypy/pypy/changeset/5eb961f7541c/
Log: fix translation
diff --git a/pypy/module/cpyext/longobject.py b/pypy/module/cpyext/longobject.py
--- a/pypy/module/cpyext/longobject.py
+++ b/pypy/module/cpyext/longobject.py
@@ -133,7 +133,7 @@
overflow_ptr[0] = rffi.cast(rffi.INT_real, -1)
return -1
- at cpython_api([PyObject, rffi.CArrayPtr(rffi.INT_real)], rffi.LONGLONG,
+ at cpython_api([PyObject, INTP_real], rffi.LONGLONG,
error=-1)
def PyLong_AsLongLongAndOverflow(space, w_long, overflow_ptr):
"""
diff --git a/pypy/module/cpyext/object.py b/pypy/module/cpyext/object.py
--- a/pypy/module/cpyext/object.py
+++ b/pypy/module/cpyext/object.py
@@ -228,7 +228,7 @@
comparison is returned in result. Returns -1 on failure. This is the
equivalent of the Python statement result = cmp(o1, o2)."""
res = space.int_w(space.cmp(w_o1, w_o2))
- result[0] = rffi.cast(rffi.INT, res)
+ result[0] = rffi.cast(rffi.INT_real, res)
return 0
@cpython_api([PyObject, PyObject, rffi.INT_real], PyObject)
diff --git a/pypy/module/cpyext/pystrtod.py b/pypy/module/cpyext/pystrtod.py
--- a/pypy/module/cpyext/pystrtod.py
+++ b/pypy/module/cpyext/pystrtod.py
@@ -114,7 +114,7 @@
buffer, rtype = rfloat.double_to_string(val, format_code,
intmask(precision),
intmask(flags))
- if ptype != lltype.nullptr(rffi.INTP.TO):
- ptype[0] = rffi.cast(rffi.INT, DOUBLE_TO_STRING_TYPES_MAP[rtype])
+ if ptype != lltype.nullptr(INTP_real.TO):
+ ptype[0] = rffi.cast(rffi.INT_real, DOUBLE_TO_STRING_TYPES_MAP[rtype])
bufp = rffi.str2charp(buffer)
return bufp
diff --git a/pypy/module/cpyext/unicodeobject.py b/pypy/module/cpyext/unicodeobject.py
--- a/pypy/module/cpyext/unicodeobject.py
+++ b/pypy/module/cpyext/unicodeobject.py
@@ -576,7 +576,7 @@
None, # errorhandler
byteorder)
if pbyteorder is not None:
- pbyteorder[0] = rffi.cast(rffi.INT, byteorder)
+ pbyteorder[0] = rffi.cast(rffi.INT_real, byteorder)
return space.newunicode(result)
@@ -632,7 +632,7 @@
None, # errorhandler
byteorder)
if pbyteorder is not None:
- pbyteorder[0] = rffi.cast(rffi.INT, byteorder)
+ pbyteorder[0] = rffi.cast(rffi.INT_real, byteorder)
return space.newunicode(result)
More information about the pypy-commit
mailing list