[issue11734] Add half-float (16-bit) support to struct module

Andrew Svetlov report at bugs.python.org
Wed Apr 4 15:17:29 CEST 2012


Andrew Svetlov <andrew.svetlov at gmail.com> added the comment:

Tests passed, looks good. Code is also looks ok.
Documentation is out-of-date. Patch cannot be applied to struct.rst from default branch.
Compilation generates warning messages on gcc 4.6.1:

/home/andrew/projects/py3k/Modules/_struct.c: In function ‘nu_halffloat’:
/home/andrew/projects/py3k/Modules/_struct.c:489:5: warning: pointer targets in passing argument 1 of ‘_PyFloat_Unpack2’ differ in signedness [-Wpointer-sign]
Include/floatobject.h:108:20: note: expected ‘const unsigned char *’ but argument is of type ‘const char *’
/home/andrew/projects/py3k/Modules/_struct.c: In function ‘np_halffloat’:
/home/andrew/projects/py3k/Modules/_struct.c:712:5: warning: pointer targets in passing argument 2 of ‘_PyFloat_Pack2’ differ in signedness [-Wpointer-sign]
Include/floatobject.h:87:17: note: expected ‘unsigned char *’ but argument is of type ‘char *’

After fixing warnings and structure.rst I like to see that patch in standard library.

----------
nosy: +asvetlov

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11734>
_______________________________________


More information about the Python-bugs-list mailing list