Commit 7b9cfc30 authored by Robert Bradshaw's avatar Robert Bradshaw

More cdef static method tests.

parent 5537103d
......@@ -13,6 +13,14 @@ cdef class A:
cdef static_cdef(int* x):
return 'cdef', x[0]
@staticmethod
cdef static_cdef2(int* x, int* y):
return 'cdef2', x[0] + y[0]
@staticmethod
cdef static_cdef_untyped(a, b):
return 'cdef_utyped', a, b
# @staticmethod
# cpdef static_cpdef(int x):
# """
......@@ -44,6 +52,21 @@ def call_static_cdef(int x):
cdef int *x_ptr = &x
return A.static_cdef(x_ptr)
def call_static_cdef2(int x, int y):
"""
>>> call_static_cdef2(2, 3)
('cdef2', 5)
"""
return A.static_cdef2(&x, &y)
# BROKEN
#def call_static_cdef_untyped(a, b):
# """
# >>> call_static_cdef_untyped(100, None)
# ('cdef_untyped', 100, None)
# """
# return A.static_cdef_untyped(a, b)
# def call_static_cpdef(int x):
# """
# >>> call_static_cpdef(2)
......
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