[pypy-svn] r75849 - in pypy/branch/fast-ctypes/pypy: module/jitffi rlib
getxsick at codespeak.net
getxsick at codespeak.net
Mon Jul 5 19:19:40 CEST 2010
Author: getxsick
Date: Mon Jul 5 19:19:38 2010
New Revision: 75849
Modified:
pypy/branch/fast-ctypes/pypy/module/jitffi/interp_jitffi.py
pypy/branch/fast-ctypes/pypy/rlib/rjitffi.py
Log:
add dummy support for C pointers. it shouldn't work anyway.
Modified: pypy/branch/fast-ctypes/pypy/module/jitffi/interp_jitffi.py
==============================================================================
--- pypy/branch/fast-ctypes/pypy/module/jitffi/interp_jitffi.py (original)
+++ pypy/branch/fast-ctypes/pypy/module/jitffi/interp_jitffi.py Mon Jul 5 19:19:38 2010
@@ -48,6 +48,8 @@
self.push_int(space.int_w(w_arg))
elif self.args_type[i] == 'float':
self.push_float(space.float_w(w_arg))
+ elif self.args_type[i] == 'ref':
+ self.push_ref(space.int_w(w_arg))
else:
raise OperationError(
space.w_TypeError,
Modified: pypy/branch/fast-ctypes/pypy/rlib/rjitffi.py
==============================================================================
--- pypy/branch/fast-ctypes/pypy/rlib/rjitffi.py (original)
+++ pypy/branch/fast-ctypes/pypy/rlib/rjitffi.py Mon Jul 5 19:19:38 2010
@@ -78,6 +78,8 @@
self.push_int(value)
elif tp == 'float':
self.push_float(value)
+ elif tp == 'ref':
+ self.push_ref(value)
inputargs = [self.bfuncaddr] + self.bargs
@@ -122,3 +124,8 @@
self.cpu.set_future_value_float(self.esp, value)
self.bargs.append(BoxFloat(value))
self.esp += 1
+
+ def push_ref(self, value):
+ self.cpu.set_future_value_ref(self.esp, value)
+ self.bargs.append(BoxPtr(value))
+ self.esp += 1
More information about the Pypy-commit
mailing list