GeezerVison is showing github.com — gh-157407: Use _PyUnicode_AsUTF8NoNUL for AC 's' and 'z' converters by cmaloney · Pull Request #158210 · python/cpython
Conversation
cmaloney
commented
Sep 26, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
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 Argument 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.
cc: @eendebakpt , @methane . Found this while working on moving str to Argument Clinic generated code. The call + local rather than pointer to stack member, particularly when -fstack-protector-strong is set as some distros do, gets a lot shorter.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…ters
The code was doing the same as the helper added in pythonGH-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) <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
# Conflicts:
# Modules/_ctypes/clinic/_ctypes.c.h
# Modules/_io/clinic/fileio.c.h
# Modules/_io/clinic/textio.c.h
# Modules/_io/clinic/winconsoleio.c.h
# Modules/_sqlite/clinic/connection.c.h
# Modules/cjkcodecs/clinic/multibytecodec.c.h
# Modules/clinic/_dbmmodule.c.h
# Modules/clinic/_elementtree.c.h
# Modules/clinic/_gdbmmodule.c.h
# Modules/clinic/_pickle.c.h
# Modules/clinic/_testclinic.c.h
# Modules/clinic/_tkinter.c.h
# Modules/clinic/arraymodule.c.h
# Modules/clinic/posixmodule.c.h
# Modules/clinic/pyexpat.c.h
# Objects/clinic/memoryobject.c.h
# Python/clinic/bltinmodule.c.h
# Python/clinic/sysmodule.c.h
|
@cmaloney Merge conflicts again. Can you resolve and maybe set auto-merge?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
# Conflicts:
# Modules/_testcapi/clinic/exceptions.c.h
|
@eendebakpt updated branch resolving conflicts. I can't set auto-merge / just a triager moving (hopefully) towards developer :)
|
eendebakpt reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.