[pypy-svn] pypy real-rffi.INT: Turn some rffi.LONG into lltype.Signed,
amauryfa
commits-noreply at bitbucket.org
Wed Mar 2 20:23:07 CET 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: real-rffi.INT
Changeset: r42391:81d8c9304a58
Date: 2011-03-02 15:44 +0100
http://bitbucket.org/pypy/pypy/changeset/81d8c9304a58/
Log: Turn some rffi.LONG into lltype.Signed, all tests in test_rffi.py
pass
diff --git a/pypy/rpython/memory/gc/inspector.py b/pypy/rpython/memory/gc/inspector.py
--- a/pypy/rpython/memory/gc/inspector.py
+++ b/pypy/rpython/memory/gc/inspector.py
@@ -109,8 +109,8 @@
self.gc = gc
self.gcflag = gc.gcflag_extra
self.fd = rffi.cast(rffi.INT, fd)
- self.writebuffer = lltype.malloc(rffi.LONGP.TO, self.BUFSIZE,
- flavor='raw')
+ self.writebuffer = lltype.malloc(rffi.CArrayPtr(lltype.Signed).TO,
+ self.BUFSIZE, flavor='raw')
self.buf_count = 0
if self.gcflag == 0:
self.seen = AddressDict()
diff --git a/pypy/rlib/rdtoa.py b/pypy/rlib/rdtoa.py
--- a/pypy/rlib/rdtoa.py
+++ b/pypy/rlib/rdtoa.py
@@ -41,8 +41,8 @@
try:
result = dg_strtod(ll_input, end_ptr)
- endpos = (rffi.cast(rffi.LONG, end_ptr[0]) -
- rffi.cast(rffi.LONG, ll_input))
+ endpos = (rffi.cast(lltype.Signed, end_ptr[0]) -
+ rffi.cast(lltype.Signed, ll_input))
if endpos == 0 or endpos < len(input):
raise ValueError("invalid input at position %d" % (endpos,))
More information about the Pypy-commit
mailing list