Repository navigation
Honor ctypes OUT parameter conversions - #9618
Merged
youknowone merged 3 commits intoNov 7, 2026
Merged
youknowone merged 3 commits into
youknowone merged 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
|
Caution Review failedThe pull request is closed.
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. |
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
youknowone
reviewed
Nov 6, 2026
| /// Out buffers for paramflags OUT parameters | ||
| type OutBuffers = Vec<(usize, PyObjectRef)>; | ||
| /// Values returned for paramflags OUT and IN/OUT parameters. | ||
| enum OutValue { |
Member
There was a problem hiding this comment.
at least not bad at the moment
youknowone
approved these changes
Nov 7, 2026
youknowone
marked this pull request as ready for review
November 7, 2026 00:28
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.