On Wed, 10 Feb 2016, Yury V. Zaytsev wrote:
If the return type of a function is a normal type, then everything is
fine, but if it's a pointer or reference type, then Cython refuses to
compile it.
I've just found out that apparently this happens because Cython misparses
function definition as an array declaration, but luckily a safety check
kicks in.
An obvious workaround is:
ctypedef char* r1
ctypedef char& r2
cdef extern from * nogil:
cdef cppclass test:
r1 assign[input_iterator](input_iterator, input_iterator)
r2 assign[input_iterator](input_iterator, input_iterator)
which compiles just fine. Unfortunately, I'm not well-versed enough with
the parser to provide a patch...
Hope that helps to fix the problem for good though!
--
Sincerely yours,
Yury V. Zaytsev
_______________________________________________
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel