[pypy-svn] r50340 - pypy/branch/applevel-ctypes/pypy/module/_ffi

fijal at codespeak.net fijal at codespeak.net
Fri Jan 4 23:19:41 CET 2008


Author: fijal
Date: Fri Jan  4 23:19:39 2008
New Revision: 50340

Modified:
   pypy/branch/applevel-ctypes/pypy/module/_ffi/structure.py
Log:
Kill the __new__ of structure instance.


Modified: pypy/branch/applevel-ctypes/pypy/module/_ffi/structure.py
==============================================================================
--- pypy/branch/applevel-ctypes/pypy/module/_ffi/structure.py	(original)
+++ pypy/branch/applevel-ctypes/pypy/module/_ffi/structure.py	Fri Jan  4 23:19:39 2008
@@ -76,8 +76,8 @@
                 raise OperationError(
                         space.w_TypeError,
                         space.wrap("Keyword arguments not allowed when passing address argument"))
-            return W_StructureInstance(space, self, args_w[0], None)
-        return W_StructureInstance(space, self, None, kwargs_w)
+            return space.wrap(W_StructureInstance(space, self, args_w[0], None))
+        return space.wrap(W_StructureInstance(space, self, None, kwargs_w))
 
 def descr_new_structure(space, w_type, w_fields):
     return W_Structure(space, w_fields)
@@ -143,13 +143,8 @@
     def getbuffer(space, self):
         return space.wrap(rffi.cast(rffi.INT, self.ll_buffer))
 
-def descr_new_structure_instance(space, w_type, w_shape, w_adr, w_fieldinits):
-    fieldinits_w = space.unpackiterable(w_fieldinits)
-    return W_StructureInstance(space, w_shape, w_adr, fieldinits_w)
-
 W_StructureInstance.typedef = TypeDef(
     'StructureInstance',
-    __new__     = interp2app(descr_new_structure_instance),
     __getattr__ = interp2app(W_StructureInstance.getattr),
     __setattr__ = interp2app(W_StructureInstance.setattr),
     buffer      = GetSetProperty(W_StructureInstance.getbuffer),


More information about the pypy-svn mailing list