]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-111089: PyUnicode_AsUTF8AndSize() sets size on error (#111106)
authorVictor Stinner <vstinner@python.org>
Fri, 20 Oct 2023 18:03:11 +0000 (20:03 +0200)
committerGitHub <noreply@github.com>
Fri, 20 Oct 2023 18:03:11 +0000 (20:03 +0200)
commitf1e751e933aa8c39c0e9cfa4cdc3f8f9f0538202
tree78e958a08e7f3e7448f110bc8755b2e4343acec1
parentd8f32be5b6a736dc2fc9dca3f1bf176c82fc9b44
gh-111089: PyUnicode_AsUTF8AndSize() sets size on error (#111106)

On error, PyUnicode_AsUTF8AndSize() now sets the size argument to -1,
to avoid undefined value.
Doc/c-api/unicode.rst
Modules/_testcapi/unicode.c
Objects/unicodeobject.c