[issue29300] Modify the _struct module to use FASTCALL and Argument Clinic

STINNER Victor report at bugs.python.org
Thu Feb 2 07:25:09 EST 2017


STINNER Victor added the comment:

Martin> Shouldn’t the top-level unpack() parameter be called “buffer” like the other functions and methods, not “inputstr”?

Hum. I reopen the issue.

Attached patch renames unpack() "inputstr" argument to "buffer" and uses the Py_buffer type for it. I had to fix unit tests which passed str instead of bytes to buffer. Before this error was missed because the unit test is written to test the format string value, not the type of arguments.

----------
resolution: fixed -> 
Added file: http://bugs.python.org/file46490/unpack_buffer.patch

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


More information about the Python-bugs-list mailing list