summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-10-20 17:29:27 (GMT)
committerGitHub <noreply@github.com>2023-10-20 17:29:27 (GMT)
commitd8f32be5b6a736dc2fc9dca3f1bf176c82fc9b44 (patch)
tree371af41d6ec06a2d00f17212d1047d2b026ec9d3 /PC
parent264f4af506bf5b587105eab37fcfb7dfa62d6587 (diff)
downloadcpython-d8f32be5b6a736dc2fc9dca3f1bf176c82fc9b44.zip
cpython-d8f32be5b6a736dc2fc9dca3f1bf176c82fc9b44.tar.gz
cpython-d8f32be5b6a736dc2fc9dca3f1bf176c82fc9b44.tar.bz2
gh-111089: Add PyUnicode_AsUTF8() to the limited C API (#111121)
Add PyUnicode_AsUTF8() function to the limited C API. multiprocessing posixshmem now uses PyUnicode_AsUTF8() instead of PyUnicode_AsUTF8AndSize(): the extension is built with the limited C API. The function now raises an exception if the filename contains an embedded null character instead of truncating silently the filename.
Diffstat (limited to 'PC')
-rwxr-xr-xPC/python3dll.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/PC/python3dll.c b/PC/python3dll.c
index d12889f..7f5d97a 100755
--- a/PC/python3dll.c
+++ b/PC/python3dll.c
@@ -661,6 +661,7 @@ EXPORT_FUNC(PyUnicode_AsUCS4Copy)
EXPORT_FUNC(PyUnicode_AsUnicodeEscapeString)
EXPORT_FUNC(PyUnicode_AsUTF16String)
EXPORT_FUNC(PyUnicode_AsUTF32String)
+EXPORT_FUNC(PyUnicode_AsUTF8)
EXPORT_FUNC(PyUnicode_AsUTF8AndSize)
EXPORT_FUNC(PyUnicode_AsUTF8String)
EXPORT_FUNC(PyUnicode_AsWideChar)