summaryrefslogtreecommitdiff
path: root/docs/examples/userguide/language_basics/function_pointer.pyx
blob: b345c62b482a50866036c6ead50e43fa5caff422 (plain)
1
2
3
4
5
6
7
8
cdef int(*ptr_add)(int, int)

cdef int add(int a, int b):
    return a + b

ptr_add = add

print(ptr_add(1, 3))