STINNER Victor <vstin...@python.org> added the comment:

To test if a C type is signed or not, I wrote this macro:

// Test if a C type is signed.
//
// Usage: assert(_Py_CTYPE_IS_SIGNED(char)); // fail if 'char' type is unsigned
#define _Py_CTYPE_IS_SIGNED(T) (((T)-1) < 0)

I planned to use it to raise an error on "import audioop" if the C "char" type 
is unsigned, but it seems like it's not needed, since the C extensions seems to 
work if char is signed or unsigned (I only read the C code, I didn't run 
test_audioop to actually test it).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46513>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to