[pypy-commit] pypy py3.5: Remove __long__ on py3

arigo pypy.commits at gmail.com
Tue Oct 2 12:37:52 EDT 2018


Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r95177:ade16cd72f6b
Date: 2018-10-02 18:29 +0200
http://bitbucket.org/pypy/pypy/changeset/ade16cd72f6b/

Log:	Remove __long__ on py3

diff --git a/pypy/module/_cffi_backend/cdataobj.py b/pypy/module/_cffi_backend/cdataobj.py
--- a/pypy/module/_cffi_backend/cdataobj.py
+++ b/pypy/module/_cffi_backend/cdataobj.py
@@ -79,13 +79,6 @@
             w_result = self.ctype.cast_to_int(ptr)
         return w_result
 
-    def long(self, space):
-        w_result = self.int(space)
-        space = self.space
-        if space.is_w(space.type(w_result), space.w_int):
-            w_result = space.newlong(space.int_w(w_result))
-        return w_result
-
     def float(self):
         with self as ptr:
             w_result = self.ctype.float(ptr)
@@ -664,7 +657,6 @@
     __repr__ = interp2app(W_CData.repr),
     __bool__ = interp2app(W_CData.bool),
     __int__ = interp2app(W_CData.int),
-    __long__ = interp2app(W_CData.long),
     __float__ = interp2app(W_CData.float),
     __complex__ = interp2app(W_CData.complex),
     __len__ = interp2app(W_CData.len),


More information about the pypy-commit mailing list