I think again this is an instance of the tests being incorrect, rather than the 
code.  The failing numpy_tests are all cases where we instantiate a buffer of 
type 'b' (== 'signed char') but then try to use it as if it was a 'char'.

The fix, of course is to just replace most instances of 'char' with 'signed 
char' in numpy_test.pyx:
https://github.com/bfroehle/cython/compare/char-buffers

In some sense NumPy does have a notion of 'char', namely a 1 character string.

The only worry here, of course, is whether this change will painfully break 
existing code…

-Brad  
> Actually, this fix breaks numpy_test, and I'm not sure how to fix it
> given that numpy has no notion of a "possibly signed char" (unless we
> disallow using char/char* with numpy altogether, which is much more
> extreme, or don't enforce that signs match for char, which is likely
> more invasive). Ugh.
>  
>  


_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to