[issue39087] [C API] No efficient C API to get UTF-8 string from unicode object.

STINNER Victor report at bugs.python.org
Thu Dec 19 05:37:20 EST 2019


STINNER Victor <vstinner at python.org> added the comment:

return PyBytesType.tp_as_buffer(bytes, view, PyBUF_CONTIG_RO);

Don't you need to DECREF bytes somehow, at least, in case of failure?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39087>
_______________________________________


More information about the Python-bugs-list mailing list