[pypy-svn] r59950 - in pypy/branch/oo-jit/pypy/rpython/lltypesystem: . test
arigo at codespeak.net
arigo at codespeak.net
Sun Nov 16 20:11:20 CET 2008
Author: arigo
Date: Sun Nov 16 20:11:19 2008
New Revision: 59950
Modified:
pypy/branch/oo-jit/pypy/rpython/lltypesystem/lltype.py
pypy/branch/oo-jit/pypy/rpython/lltypesystem/test/test_ll2ctypes.py
Log:
Addendum. Doesn't work...
Modified: pypy/branch/oo-jit/pypy/rpython/lltypesystem/lltype.py
==============================================================================
--- pypy/branch/oo-jit/pypy/rpython/lltypesystem/lltype.py (original)
+++ pypy/branch/oo-jit/pypy/rpython/lltypesystem/lltype.py Sun Nov 16 20:11:19 2008
@@ -1084,7 +1084,7 @@
if len(args) != len(self._T.ARGS):
raise TypeError,"calling %r with wrong argument number: %r" % (self._T, args)
for a, ARG in zip(args, self._T.ARGS):
- if typeOf(a) != ARG:
+ if typeOf(a) != ARG and ARG != Void:
# special case: ARG can be a container type, in which
# case a should be a pointer to it. This must also be
# special-cased in the backends.
Modified: pypy/branch/oo-jit/pypy/rpython/lltypesystem/test/test_ll2ctypes.py
==============================================================================
--- pypy/branch/oo-jit/pypy/rpython/lltypesystem/test/test_ll2ctypes.py (original)
+++ pypy/branch/oo-jit/pypy/rpython/lltypesystem/test/test_ll2ctypes.py Sun Nov 16 20:11:19 2008
@@ -871,8 +871,8 @@
ftest.append(x)
F = lltype.FuncType([lltype.Void], lltype.Void)
fn = lltype.functionptr(F, 'askjh', _callable=f)
- fn(None)
- assert ftest == [None]
+ fn(-5)
+ assert ftest == [-5]
fn2 = lltype2ctypes(fn)
fn2()
- assert ftest == [None, None]
+ assert ftest == [-5, None]
More information about the Pypy-commit
mailing list