summaryrefslogtreecommitdiff
path: root/Include/cpython/unicodeobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/cpython/unicodeobject.h')
-rw-r--r--Include/cpython/unicodeobject.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/Include/cpython/unicodeobject.h b/Include/cpython/unicodeobject.h
index be91d2d9fc..54a13e32ba 100644
--- a/Include/cpython/unicodeobject.h
+++ b/Include/cpython/unicodeobject.h
@@ -734,19 +734,6 @@ PyAPI_FUNC(void*) _PyUnicode_AsKind(PyObject *s, unsigned int kind);
/* --- Manage the default encoding ---------------------------------------- */
-/* Get a buffer to the UTF-8 encoding of the Unicode object unicode.
- Returns -1 on error.
-
- Successful calls must be paired to
- calls to PyBuffer_Release.
-*/
-
-PyAPI_FUNC(int) _PyUnicode_GetUTF8Buffer(
- PyObject *unicode, /* Unicode object */
- const char *errors, /* error handling */
- Py_buffer *view /* (out) buffer to the UTF-8 encoding */
- );
-
/* Returns a pointer to the default encoding (UTF-8) of the
Unicode object unicode and the size of the encoded representation
in bytes stored in *size.
@@ -759,6 +746,12 @@ PyAPI_FUNC(int) _PyUnicode_GetUTF8Buffer(
_PyUnicode_AsStringAndSize is a #define for PyUnicode_AsUTF8AndSize to
support the previous internal function with the same behaviour.
+
+ *** This API is for interpreter INTERNAL USE ONLY and will likely
+ *** be removed or changed in the future.
+
+ *** If you need to access the Unicode object as UTF-8 bytes string,
+ *** please use PyUnicode_AsUTF8String() instead.
*/
PyAPI_FUNC(const char *) PyUnicode_AsUTF8AndSize(