]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-111089: Use PyUnicode_AsUTF8() in Argument Clinic (#111585)
authorVictor Stinner <vstinner@python.org>
Wed, 1 Nov 2023 15:34:42 +0000 (16:34 +0100)
committerGitHub <noreply@github.com>
Wed, 1 Nov 2023 15:34:42 +0000 (16:34 +0100)
commitd9b606b3d04fc56fb0bcc479d7d6c14562edb5e2
tree14d10605507380e411d5f62e5bab28f74091129d
parent97b3cd38d105fd891ba46dd27d08f03d1c6dd348
gh-111089: Use PyUnicode_AsUTF8() in Argument Clinic (#111585)

Replace PyUnicode_AsUTF8AndSize() with PyUnicode_AsUTF8() to remove
the explicit check for embedded null characters.

The change avoids to have to include explicitly <string.h> to get the
strlen() function when using a recent version of the limited C API.
34 files changed:
Modules/_io/clinic/_iomodule.c.h
Modules/_io/clinic/fileio.c.h
Modules/_io/clinic/textio.c.h
Modules/_io/clinic/winconsoleio.c.h
Modules/_multiprocessing/clinic/multiprocessing.c.h
Modules/_multiprocessing/clinic/semaphore.c.h
Modules/_sqlite/clinic/connection.c.h
Modules/_sqlite/clinic/cursor.c.h
Modules/_sqlite/clinic/module.c.h
Modules/_testcapi/clinic/exceptions.c.h
Modules/cjkcodecs/clinic/multibytecodec.c.h
Modules/clinic/_codecsmodule.c.h
Modules/clinic/_cursesmodule.c.h
Modules/clinic/_dbmmodule.c.h
Modules/clinic/_elementtree.c.h
Modules/clinic/_gdbmmodule.c.h
Modules/clinic/_hashopenssl.c.h
Modules/clinic/_localemodule.c.h
Modules/clinic/_pickle.c.h
Modules/clinic/_ssl.c.h
Modules/clinic/_testclinic.c.h
Modules/clinic/_tkinter.c.h
Modules/clinic/posixmodule.c.h
Modules/clinic/pyexpat.c.h
Modules/clinic/symtablemodule.c.h
Objects/clinic/bytearrayobject.c.h
Objects/clinic/bytesobject.c.h
Objects/clinic/floatobject.c.h
Objects/clinic/memoryobject.c.h
Objects/clinic/unicodeobject.c.h
Python/clinic/Python-tokenize.c.h
Python/clinic/bltinmodule.c.h
Python/clinic/sysmodule.c.h
Tools/clinic/clinic.py