Hi,
I've come across an odd bug while creating interfaces to existing C++
functions via Cython.
If a C++ pair is contained inside of another template type, the pair cannot
contain unsigned integers unless a typedef is provided for unsigned.
Examples:
#This works:
cdef vector[pair[char,char]] doit():
cdef vector[pair[char,char]] rv
return rv
#This fails:
cdef vector[pair[unsigned,char]] doit2():
cdef vector[pair[unsigned,char]] rv
return rv
#But this works:
ctypedef unsigned uint
cdef vector[pair[uint,uint]] doit3():
cdef vector[pair[uint,uint]] rv
return rv
#This fails:
cdef void doit4( const vector[pair[unsigned,double]] & x):
pass
--Kevin
_______________________________________________
cython-devel mailing list
[email protected]
https://mail.python.org/mailman/listinfo/cython-devel