diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2023-11-10 19:31:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-10 19:31:36 (GMT) |
commit | 771bd3c94a366547e0c3451a72a430e1132c1ac1 (patch) | |
tree | 92d9e843024137d115ff9e1fc22399f4707700ef /Include/internal | |
parent | 3932b0f7b1566374427daa8bc47203032015e350 (diff) | |
download | cpython-771bd3c94a366547e0c3451a72a430e1132c1ac1.zip cpython-771bd3c94a366547e0c3451a72a430e1132c1ac1.tar.gz cpython-771bd3c94a366547e0c3451a72a430e1132c1ac1.tar.bz2 |
Add private _PyUnicode_AsUTF8NoNUL() function (GH-111957)
Like PyUnicode_AsUTF8(), but check for embedded null characters.
Diffstat (limited to 'Include/internal')
-rw-r--r-- | Include/internal/pycore_unicodeobject.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/internal/pycore_unicodeobject.h b/Include/internal/pycore_unicodeobject.h index 360a9e1..23e2670 100644 --- a/Include/internal/pycore_unicodeobject.h +++ b/Include/internal/pycore_unicodeobject.h @@ -434,6 +434,10 @@ struct _Py_unicode_state { extern void _PyUnicode_InternInPlace(PyInterpreterState *interp, PyObject **p); extern void _PyUnicode_ClearInterned(PyInterpreterState *interp); +// Like PyUnicode_AsUTF8(), but check for embedded null characters. +// Export for '_sqlite3' shared extension. +PyAPI_FUNC(const char *) _PyUnicode_AsUTF8NoNUL(PyObject *); + #ifdef __cplusplus } |