@@ -443,25 +443,17 @@ PyAPI_FUNC(PyObject*) PyUnicode_AsUTF8String(
443443 PyObject * unicode /* Unicode object */
444444 );
445445
446- // Returns a pointer to the UTF-8 encoding of the Unicode object unicode.
447- //
448- // Raise an exception if the string contains embedded null characters.
449- // Use PyUnicode_AsUTF8AndSize() to accept embedded null characters.
450- //
451- // This function caches the UTF-8 encoded string in the Unicode object
452- // and subsequent calls will return the same string. The memory is released
453- // when the Unicode object is deallocated.
454- PyAPI_FUNC (const char * ) PyUnicode_AsUTF8 (PyObject * unicode );
455-
456- // Returns a pointer to the UTF-8 encoding of the
457- // Unicode object unicode and the size of the encoded representation
458- // in bytes stored in `*size` (if size is not NULL).
459- //
460- // On error, `*size` is set to 0 (if size is not NULL).
461- //
462- // This function caches the UTF-8 encoded string in the Unicode object
463- // and subsequent calls will return the same string. The memory is released
464- // when the Unicode object is deallocated.
446+ /* Returns a pointer to the default encoding (UTF-8) of the
447+ Unicode object unicode and the size of the encoded representation
448+ in bytes stored in *size.
449+
450+ In case of an error, no *size is set.
451+
452+ This function caches the UTF-8 encoded string in the unicodeobject
453+ and subsequent calls will return the same string. The memory is released
454+ when the unicodeobject is deallocated.
455+ */
456+
465457#if !defined(Py_LIMITED_API ) || Py_LIMITED_API + 0 >= 0x030A0000
466458PyAPI_FUNC (const char * ) PyUnicode_AsUTF8AndSize (
467459 PyObject * unicode ,
0 commit comments