Commit 41521d00 authored by Boxiang Sun's avatar Boxiang Sun

Update test.pyx

parent 96411e75
......@@ -89,17 +89,19 @@ cdef int bar() nogil: # yet this is what we would like to
o.foo() # and we need method selection to be independent of libpython
o.foo1(2)
o.a = 1.0
return 0
return o.a
cpdef baz():
"""
This method is both callable from python and pure "cython".
It can call both cdef methods and usual python functions
"""
bar()
return bar()
def bag():
return str(baz())
# We call here a cpdef function, which calls a def function
# which then allocates cdef class SomeMemory
baz()
print(bag())
print("done")
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