[pypy-svn] r77713 - pypy/branch/fast-forward/pypy/module/_io
afa at codespeak.net
afa at codespeak.net
Fri Oct 8 12:02:27 CEST 2010
Author: afa
Date: Fri Oct 8 12:02:26 2010
New Revision: 77713
Modified:
pypy/branch/fast-forward/pypy/module/_io/interp_io.py
Log:
Fix translation: interp2app requires that all functions in the same module have different names
Modified: pypy/branch/fast-forward/pypy/module/_io/interp_io.py
==============================================================================
--- pypy/branch/fast-forward/pypy/module/_io/interp_io.py (original)
+++ pypy/branch/fast-forward/pypy/module/_io/interp_io.py Fri Oct 8 12:02:26 2010
@@ -1,16 +1,18 @@
from pypy.interpreter.baseobjspace import ObjSpace, Wrappable, W_Root
from pypy.interpreter.typedef import TypeDef, interp_attrproperty
-from pypy.interpreter.gateway import interp2app, Arguments
+from pypy.interpreter.gateway import interp2app, Arguments, unwrap_spec
from pypy.module.exceptions.interp_exceptions import W_IOError
+from pypy.tool.sourcetools import func_renamer
DEFAULT_BUFFER_SIZE = 8192
def GenericNew(W_Type):
+ @unwrap_spec(ObjSpace, W_Root, Arguments)
+ @func_renamer('descr_new_%s' % W_Type.__name__)
def descr_new(space, w_subtype, __args__):
self = space.allocate_instance(W_Type, w_subtype)
W_Type.__init__(self, space)
return space.wrap(self)
- descr_new.unwrap_spec = [ObjSpace, W_Root, Arguments]
return interp2app(descr_new)
class W_BlockingIOError(W_IOError):
@@ -18,10 +20,10 @@
W_IOError.__init__(self, space)
self.written = 0
+ @unwrap_spec('self', ObjSpace, W_Root, W_Root, int)
def descr_init(self, space, w_errno, w_strerror, written=0):
W_IOError.descr_init(self, space, [w_errno, w_strerror])
self.written = written
- descr_init.unwrap_spec = ['self', ObjSpace, W_Root, W_Root, int]
W_BlockingIOError.typedef = TypeDef(
'BlockingIOError',
More information about the Pypy-commit
mailing list