Skip to content

Commit 60407e8

Browse files
Document the lifetime of PyUnicode_AsUTF8String (GH-92325)
The current wording implied this, but didn't state it explicitly. (cherry picked from commit 740da8d) Co-authored-by: Matt Wozniski <[email protected]>
1 parent df48bd9 commit 60407e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Doc/c-api/unicode.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,8 @@ These are the UTF-8 codec APIs:
11101110
11111111
This caches the UTF-8 representation of the string in the Unicode object, and
11121112
subsequent calls will return a pointer to the same buffer. The caller is not
1113-
responsible for deallocating the buffer.
1113+
responsible for deallocating the buffer. The buffer is deallocated and
1114+
pointers to it become invalid when the Unicode object is garbage collected.
11141115
11151116
.. versionadded:: 3.3
11161117

0 commit comments

Comments
 (0)