Repository navigation
Honor ctypes OUT parameter conversions - #9618
Draft
youknowdot wants to merge 3 commits into
Draft
youknowdot wants to merge 3 commits into
youknowdot wants to merge 3 commits into
Conversation
Use __ctypes_from_outparam__ for pure OUT values and preserve IN/OUT object identity. Propagate conversion errors and release the raw result before callbacks. Assisted-by: OpenAI Codex:model version not exposed
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. CodeRabbit Verify
|
Pass a supplied OUT default through the argument converter, retain its owner across the foreign call, and use that same object for output conversion. Assisted-by: OpenAI Codex:model version not exposed
This was referenced Nov 3, 2026
A live default buffer can be resized by a later argument converter after its raw pointer is captured. Revert this expanded path until buffer lifetime is protected. Assisted-by: OpenAI Codex:model version not exposed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
__ctypes_from_outparam__for pure OUT parameters, honoring overrides and propagating lookup or conversion errors..value.Scope
The follow-on for supplied pure-OUT defaults has been reverted: a later argument converter can resize a default object's buffer after a raw pointer is captured, so that expanded path needs a separate buffer-lifetime solution. Existing implicit-OUT
from_paramand array handling, argument conversion/interleaving error order, and theerrcheckargument tuple and snapshot timing also remain separate. The replacement-result decision is addressed independently by #9616.Validation
_build_result. CPython 3.15 libctimereproductions confirmed custom pure-OUT conversion and exception propagation, and IN/OUT identity.