Message297813
Since Python 3.3 PyUnicode_AsUnicodeAndSize() is deprecated in favour of PyUnicode_AsWideChar() and PyUnicode_AsWideCharString(). But the latter two are implemented using PyUnicode_AsUnicodeAndSize(). This prevents adding the deprecation compiler warning for PyUnicode_AsUnicodeAndSize(). Other side effect -- PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() cache the wchar_t* representation of the PyUnicode object increasing its memory consumption.
Proposed patch reimplements PyUnicode_AsWideChar(), PyUnicode_AsWideCharString() and PyUnicode_AsUnicodeAndSize() using two common helper functions. PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() no longer cache the wchar_t* representation. |
|
Date |
User |
Action |
Args |
2017-07-06 07:53:21 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, vstinner, ezio.melotti |
2017-07-06 07:53:21 | serhiy.storchaka | set | messageid: <1499327601.89.0.422030261957.issue30863@psf.upfronthosting.co.za> |
2017-07-06 07:53:21 | serhiy.storchaka | link | issue30863 messages |
2017-07-06 07:53:21 | serhiy.storchaka | create | |
|