[pypy-commit] pypy fast_cffi_list_init: move these two methods to the very base class

antocuni noreply at buildbot.pypy.org
Fri Oct 11 15:02:38 CEST 2013


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: fast_cffi_list_init
Changeset: r67313:5019ee2fb1c2
Date: 2013-10-11 14:26 +0200
http://bitbucket.org/pypy/pypy/changeset/5019ee2fb1c2/

Log:	move these two methods to the very base class

diff --git a/pypy/module/_cffi_backend/ctypeobj.py b/pypy/module/_cffi_backend/ctypeobj.py
--- a/pypy/module/_cffi_backend/ctypeobj.py
+++ b/pypy/module/_cffi_backend/ctypeobj.py
@@ -43,6 +43,12 @@
     def is_unichar_ptr_or_array(self):
         return False
 
+    def is_long(self):
+        return False
+
+    def is_double(self):
+        return False
+
     def newp(self, w_init):
         space = self.space
         raise operationerrfmt(space.w_TypeError,
diff --git a/pypy/module/_cffi_backend/ctypeprim.py b/pypy/module/_cffi_backend/ctypeprim.py
--- a/pypy/module/_cffi_backend/ctypeprim.py
+++ b/pypy/module/_cffi_backend/ctypeprim.py
@@ -85,12 +85,6 @@
             return self.space.wrap(s)
         return W_CType.string(self, cdataobj, maxlen)
 
-    def is_long(self):
-        return False
-
-    def is_double(self):
-        return False
-
 class W_CTypePrimitiveCharOrUniChar(W_CTypePrimitive):
     _attrs_ = []
     is_primitive_integer = True


More information about the pypy-commit mailing list