1# ticket: 384 2 3""" 4>>> test(3) 5(3+1j) 6""" 7 8cimport cython 9 10ctypedef Py_ssize_t index_t 11 12ctypedef double complex mycomplex 13 14ctypedef struct MyStruct: 15 mycomplex a, b 16 17@cython.cdivision(False) 18def test(index_t x): 19 cdef index_t y = x // 2 20 cdef MyStruct s 21 s.a = x + y*1j 22 return s.a 23