4 cdef extern from "cpp_references_helper.h":
5 cdef int& ref_func(int&)
11 def test_ref_func(int x):
20 def test_ref_func_address(int x):
22 >>> test_ref_func_address(5)
24 >>> test_ref_func_address(7)
27 cdef int* i_ptr = &ref_func(x)
30 def test_ref_var(int x):
40 def test_ref_assign(int x):
42 >>> test_ref_assign(17)
44 >>> test_ref_assign(19)
47 cdef double d = ref_func(x)
50 @cython.infer_types(True)
51 def test_ref_inference(int x):
53 >>> test_ref_inference(23)
55 >>> test_ref_inference(29)
59 assert cython.typeof(z) == "int", cython.typeof(z)