[Python-Dev] Chose a name for a "get unicode as wide character, borrowed reference" function
Victor Stinner
victor.stinner at haypocalc.com
Mon Nov 21 18:02:36 CET 2011
More information about the Python-Dev mailing list
Mon Nov 21 18:02:36 CET 2011
- Previous message: [Python-Dev] Chose a name for a "get unicode as wide character, borrowed reference" function
- Next message: [Python-Dev] Chose a name for a "get unicode as wide character, borrowed reference" function
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Le Lundi 21 Novembre 2011 16:55:05 Antoine Pitrou a écrit : > > I want to rename PyUnicode_AsUnicode() and change its result type > > (Py_UNICODE* => wchar_t*). The result will be a "borrowed reference", > > ie. you don't have to free the memory, it will be done when the Unicode > > string will be destroyed (by Py_DECREF). > > But this is almost the same as PyUnicode_AsWideCharString, right? You have to free the memory for PyUnicode_AsWideCharString(). With PyUnicode_AsWideCharXXX(), as PyUnicode_AsUnicode(), you don't have to. The memory is handled by the Unicode object. Victor
- Previous message: [Python-Dev] Chose a name for a "get unicode as wide character, borrowed reference" function
- Next message: [Python-Dev] Chose a name for a "get unicode as wide character, borrowed reference" function
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list