]> granicus.if.org Git - python/commit
[3.5] bpo-30708: Add private C API function _PyUnicode_AsWideCharString(). (GH-2285...
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 27 Jun 2017 18:52:10 +0000 (21:52 +0300)
committerGitHub <noreply@github.com>
Tue, 27 Jun 2017 18:52:10 +0000 (21:52 +0300)
commit94b169fe48bc7ea76b926823885d1b12c2c381fa
tree254a685184c3fab7c2f1311986a82b03cc028371
parenteb3c52a0d273491e745e0cbff2b73900bb96aa45
[3.5] bpo-30708: Add private C API function _PyUnicode_AsWideCharString(). (GH-2285) (GH-2443)  (#2448)

And use it instead of PyUnicode_AsWideCharString() if appropriate.

_PyUnicode_AsWideCharString(unicode) is like PyUnicode_AsWideCharString(unicode, NULL), but
raises a ValueError if the wchar_t* string contains null characters.
(cherry picked from commit e613e6add5f07ff6aad5802924596b631b707d2a).
(cherry picked from commit 0edffa3073b551ffeca34952529e7b292f1bd350)
Include/unicodeobject.h
Lib/ctypes/test/test_slicing.py
Modules/_ctypes/callproc.c
Modules/_ctypes/cfield.c
Modules/_cursesmodule.c
Modules/_localemodule.c
Modules/_tkinter.c
Modules/overlapped.c
Modules/timemodule.c
Objects/unicodeobject.c