cpython/Modules/_sqlite
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
..
clinic gh-157407: Use _PyUnicode_AsUTF8NoNUL for AC 's' and 'z' converters (#158210) 2026-10-05 17:03:27 +00:00
blob.c gh-155742: Use PyBytesWriter in _Py_strhex_impl() (#157734) 2026-09-18 14:09:09 +02:00
blob.h
connection.c gh-155952: Fix <unrepresentable> Argument Clinic defaults in several signatures (#155954) 2026-08-21 10:03:51 +01:00
connection.h gh-144377: Clean up sqlite3 Connection's list of weakrefs to Cursor objects (#144378) 2026-02-03 13:36:12 +01:00
cursor.c gh-113318: Better implementation of @getter and @setter in Argument Clinic (GH-156066) 2026-09-19 18:48:39 +03:00
cursor.h gh-139283: correctly handle size limit in cursor.fetchmany() (#139296) 2025-09-30 11:18:55 +02:00
microprotocols.c gh-111789: Simplify the sqlite code (GH-111829) 2023-11-10 20:49:24 +00:00
microprotocols.h
module.c gh-157470: Add structured version info for sqlite3 (GH-157471) 2026-09-29 15:48:39 +03:00
module.h
prepare_protocol.c gh-138342: Move _PyObject_VisitType() to the internal C API (#139734) 2025-10-08 12:10:58 +02:00
prepare_protocol.h
row.c gh-153695: Fix sqlite3.Row.__hash__ with an unhashable value (#153696) 2026-07-14 22:23:58 +00:00
row.h
statement.c gh-139327: consolidate sqlite3_finalize and sqlite3_reset usages (GH-139329) 2025-10-15 15:18:07 +02:00
statement.h
util.c gh-139327: consolidate sqlite3_finalize and sqlite3_reset usages (GH-139329) 2025-10-15 15:18:07 +02:00
util.h gh-139327: consolidate sqlite3_finalize and sqlite3_reset usages (GH-139329) 2025-10-15 15:18:07 +02:00