Commit 140c40d4 authored by Stefan Behnel's avatar Stefan Behnel

make an old test from 'broken' directory usable

--HG--
rename : tests/broken/voidstarcast.pyx => tests/run/voidstarcast.pyx
parent e69a1fa5
cdef class C:
cdef int i
cdef int f() except -1:
def foo(self):
self.i = 42
def get_i(self):
return self.i
def cast_cast_cast(arg):
"""
>>> x = C()
>>> x.foo()
>>> cast_cast_cast(x) == x
True
>>> x.get_i()
42
"""
cdef object x
cdef void *p
cdef void *p = <void *>arg
cdef int i
x = <object>p
p = <void *>x
x = (<object>p).foo
i = (<C>p).i
(<C>p).i = i
return <object>p
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment