[pypy-svn] r76199 - pypy/branch/interplevel-array/pypy/module/array

hakanardo at codespeak.net hakanardo at codespeak.net
Wed Jul 14 13:39:55 CEST 2010


Author: hakanardo
Date: Wed Jul 14 13:39:53 2010
New Revision: 76199

Modified:
   pypy/branch/interplevel-array/pypy/module/array/__init__.py
   pypy/branch/interplevel-array/pypy/module/array/interp_array.py
Log:
reduce

Modified: pypy/branch/interplevel-array/pypy/module/array/__init__.py
==============================================================================
--- pypy/branch/interplevel-array/pypy/module/array/__init__.py	(original)
+++ pypy/branch/interplevel-array/pypy/module/array/__init__.py	Wed Jul 14 13:39:53 2010
@@ -9,6 +9,5 @@
 
     interpleveldefs = {
         'array':        'interp_array.W_WrappedArray',
-        '_new_array':   'interp_array.new_array',
         'simple_array': 'interp_simple.simple_array',
     }

Modified: pypy/branch/interplevel-array/pypy/module/array/interp_array.py
==============================================================================
--- pypy/branch/interplevel-array/pypy/module/array/interp_array.py	(original)
+++ pypy/branch/interplevel-array/pypy/module/array/interp_array.py	Wed Jul 14 13:39:53 2010
@@ -600,13 +600,7 @@
         args=[space.wrap(self._array.typecode)]
         if self._array.len>0:
             args += [self._array.descr_tostring()]
-        from pypy.interpreter.mixedmodule import MixedModule
-        w_mod    = space.getbuiltinmodule('array')
-        mod      = space.interp_w(MixedModule, w_mod)
-        w_new_inst = mod.get('_new_array')
-        return space.newtuple([w_new_inst, space.newtuple(args)])
-        return space.newtuple([space.gettypeobject(W_WrappedArray.typedef),
-                               space.newtuple(args)])
+        return space.newtuple([space.type(self), space.newtuple(args)])
         
 
 def unwrap_array(w_a):
@@ -725,6 +719,7 @@
 
 W_WrappedArray.typedef = TypeDef(
     'array',
+    __module__   = 'array',
     __new__      = interp2app(new_array_sub),
     __init__     = interp2app(W_WrappedArray.__init__),
     pop          = interp2app(W_WrappedArray.descr_pop),



More information about the Pypy-commit mailing list