[issue28200] Windows: path_converter() leaks memory for Unicode filenames

STINNER Victor report at bugs.python.org
Mon Sep 19 04:54:42 EDT 2016


STINNER Victor added the comment:

Serhiy Storchaka added the comment:
> The :c:type:`Py_UNICODE` has been deprecated by :pep:`393` and will be
> removed in Python 4. All functions using this type are deprecated:

Right... I tried to deprecate and remove all functions using
Py_UNICODE but it's hard to change all this code. I gave up :-)

>   :c:func:`PyUnicode_AsUnicodeAndSize`: use :c:func:`PyUnicode_AsWideCharString`

Sadly, it's not exactly the same: PyUnicode_AsWideCharString returns a
new fresh buffer at each call. I'm not sure that it caches the result
neither.

Victor

----------

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


More information about the Python-bugs-list mailing list