From 2fcfb855cd7780ab07751cc16c80a0a58168668a Mon Sep 17 00:00:00 2001 From: shadchin Date: Wed, 18 Jun 2025 20:33:12 +0300 Subject: Update Python 3 to 3.12.11 commit_hash:0054a0810a95d3f1aa3d36410976d43e03ff7e86 --- contrib/tools/python3/Include/cpython/bytesobject.h | 4 ++++ contrib/tools/python3/Include/cpython/unicodeobject.h | 13 +++++++++++++ 2 files changed, 17 insertions(+) (limited to 'contrib/tools/python3/Include/cpython') diff --git a/contrib/tools/python3/Include/cpython/bytesobject.h b/contrib/tools/python3/Include/cpython/bytesobject.h index e982031c107..eef607a5760 100644 --- a/contrib/tools/python3/Include/cpython/bytesobject.h +++ b/contrib/tools/python3/Include/cpython/bytesobject.h @@ -25,6 +25,10 @@ PyAPI_FUNC(PyObject*) _PyBytes_FromHex( int use_bytearray); /* Helper for PyBytes_DecodeEscape that detects invalid escape chars. */ +PyAPI_FUNC(PyObject*) _PyBytes_DecodeEscape2(const char *, Py_ssize_t, + const char *, + int *, const char **); +// Export for binary compatibility. PyAPI_FUNC(PyObject *) _PyBytes_DecodeEscape(const char *, Py_ssize_t, const char *, const char **); diff --git a/contrib/tools/python3/Include/cpython/unicodeobject.h b/contrib/tools/python3/Include/cpython/unicodeobject.h index f177cd9e2af..cf389286860 100644 --- a/contrib/tools/python3/Include/cpython/unicodeobject.h +++ b/contrib/tools/python3/Include/cpython/unicodeobject.h @@ -684,6 +684,19 @@ PyAPI_FUNC(PyObject*) _PyUnicode_DecodeUnicodeEscapeStateful( ); /* Helper for PyUnicode_DecodeUnicodeEscape that detects invalid escape chars. */ +PyAPI_FUNC(PyObject*) _PyUnicode_DecodeUnicodeEscapeInternal2( + const char *string, /* Unicode-Escape encoded string */ + Py_ssize_t length, /* size of string */ + const char *errors, /* error handling */ + Py_ssize_t *consumed, /* bytes consumed */ + int *first_invalid_escape_char, /* on return, if not -1, contain the first + invalid escaped char (<= 0xff) or invalid + octal escape (> 0xff) in string. */ + const char **first_invalid_escape_ptr); /* on return, if not NULL, may + point to the first invalid escaped + char in string. + May be NULL if errors is not NULL. */ +// Export for binary compatibility. PyAPI_FUNC(PyObject*) _PyUnicode_DecodeUnicodeEscapeInternal( const char *string, /* Unicode-Escape encoded string */ Py_ssize_t length, /* size of string */ -- cgit v1.3