Commit 97c05e7a authored by Stefan Behnel's avatar Stefan Behnel

Make a compile test runnable.

parent 8c7b0f3f
# mode: compile
cdef int grail():
cdef int (*spam)()
spam = &grail
spam = grail
spam()
ctypedef int funcptr_t()
cdef inline funcptr_t* dummy():
return &grail
# mode: run
cdef int grail():
cdef int (*spam)()
spam = &grail
spam = grail
assert spam is grail
assert spam == grail
assert spam == &grail
ctypedef int funcptr_t()
cdef funcptr_t* get_grail():
return &grail
def test_assignments():
"""
>>> test_assignments()
"""
grail()
def test_return_value():
"""
>>> test_return_value()
True
"""
g = get_grail()
return g == &grail
def call_cfuncptr():
"""
>>> call_cfuncptr()
"""
cdef int (*spam)()
spam = grail
spam()
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