Make binascii.hexlify() use s# for its arguments instead of t# to actually
match its documentation stating it accepts any read-only buffer.
This commit is contained in:
parent
442b49e938
commit
6ee7d01c05
|
@ -75,6 +75,9 @@ Core and builtins
|
|||
Extension Modules
|
||||
-----------------
|
||||
|
||||
- Change binascii.hexlify to accept a read-only buffer instead of only a char
|
||||
buffer and actually follow its documentation.
|
||||
|
||||
- Fixed a potentially invalid memory access of CJKCodecs' shift-jis decoder.
|
||||
|
||||
- Patch #1478788 (modified version): The functional extension module has
|
||||
|
|
|
@ -909,7 +909,7 @@ binascii_hexlify(PyObject *self, PyObject *args)
|
|||
char* retbuf;
|
||||
Py_ssize_t i, j;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "t#:b2a_hex", &argbuf, &arglen))
|
||||
if (!PyArg_ParseTuple(args, "s#:b2a_hex", &argbuf, &arglen))
|
||||
return NULL;
|
||||
|
||||
retval = PyString_FromStringAndSize(NULL, arglen*2);
|
||||
|
|
Loading…
Reference in New Issue