cpython/Python/clinic
Cody Maloney cfd6cf7154
gh-157407: Use _PyUnicode_AsUTF8NoNUL for AC 's' and 'z' converters (#158210)
* gh-157407: Use _PyUnicode_AsUTF8NoNUL for AC 's' and 'z' converters

The code was doing the same as the helper added in GH-111957 but inline.
That resulted in significantly more `.text` for most functions. Refactor
the Arguemnt Clinic converters code to deduplicate a bit while keeping
generated code close to original.

On my Linux x64 box this reduces `.text` by ~6200 bytes in a clang
release build (no PGO or LTO). Performance is flat.

The helper was already exported for `_sqlite3`, update the comment that
it is used in AC generated code as well.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Update Include/internal/pycore_unicodeobject.h

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>

* Remove NEWS, add period

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
2026-10-05 17:03:27 +00:00
..
_contextvars.c.h
_warnings.c.h
bltinmodule.c.h gh-157407: Use _PyUnicode_AsUTF8NoNUL for AC 's' and 'z' converters (#158210) 2026-10-05 17:03:27 +00:00
context.c.h
hamt.c.h gh-155496: Use Argument Clinic for more functions and methods (GH-158134) 2026-09-27 19:00:22 +03:00
import.c.h gh-142349: Simplify lazy import resolution (#158282) 2026-10-01 16:20:45 +00:00
instruction_sequence.c.h
instrumentation.c.h
marshal.c.h
Python-tokenize.c.h gh-157407: Use _PyUnicode_AsUTF8NoNUL for AC 's' and 'z' converters (#158210) 2026-10-05 17:03:27 +00:00
sysmodule.c.h gh-157407: Use _PyUnicode_AsUTF8NoNUL for AC 's' and 'z' converters (#158210) 2026-10-05 17:03:27 +00:00
traceback.c.h gh-113318: Better implementation of @getter and @setter in Argument Clinic (GH-156066) 2026-09-19 18:48:39 +03:00