diff options
author | Matt Wozniski <godlygeek@gmail.com> | 2022-05-06 09:37:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-06 09:37:08 (GMT) |
commit | 740da8d37a84638f4a8893bee3648f36fc6beb0f (patch) | |
tree | 0f4f0488bdd021a8f07f6da2b9a56fd2c054cff1 | |
parent | ebaf0945f9f630f32755137a54abd0a49f068e9a (diff) | |
download | cpython-740da8d37a84638f4a8893bee3648f36fc6beb0f.zip cpython-740da8d37a84638f4a8893bee3648f36fc6beb0f.tar.gz cpython-740da8d37a84638f4a8893bee3648f36fc6beb0f.tar.bz2 |
Document the lifetime of `PyUnicode_AsUTF8String` (#92325)
The current wording implied this, but didn't state it explicitly.
-rw-r--r-- | Doc/c-api/unicode.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst index 00faac5..d139112 100644 --- a/Doc/c-api/unicode.rst +++ b/Doc/c-api/unicode.rst @@ -1075,7 +1075,8 @@ These are the UTF-8 codec APIs: This caches the UTF-8 representation of the string in the Unicode object, and subsequent calls will return a pointer to the same buffer. The caller is not - responsible for deallocating the buffer. + responsible for deallocating the buffer. The buffer is deallocated and + pointers to it become invalid when the Unicode object is garbage collected. .. versionadded:: 3.3 |