Commit 345ce9b8 authored by Robert Bradshaw's avatar Robert Bradshaw

test for temp allocation bug in call

parent 9330e1a0
__doc__ = """
>>> A().test(3)
9
"""
cdef class A:
cdef int (*func_ptr)(int)
def __init__(self):
self.func_ptr = &func
cdef int do_it(self, int s):
cdef int r = first_call(self).func_ptr(s) # the temp for first_call(self) not properly freed
return r
def test(self, s):
return self.do_it(s)
cdef A first_call(A x):
return x
cdef int func(int s):
return s*s
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