Repository navigation
Share ctypes aggregate parameter conversion - #9657
youknowone merged 1 commit into
Conversation
Reuse generic from_param adaptation, preserve lookup errors and recursion bounds, and follow initialized prototype metadata for pointer and byref inputs. Assisted-by: OpenAI Codex:model version not exposed
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Codex Review SummaryThis 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. |
Summary
from_paramconversion across array, structure, union, and pointer fallback paths, removing duplicated parsing and adaptation logic._as_parameter_lookup errors and use the existing recursion guard. Recursive adaptation stays in the generic converter rather than restarting pointer-only adaptations._type_attributes. Snapshot metadata before callback-capable type checks.No
simple.rs,function.rs, tests, snippets, or workflows are changed. This composes with the separate scalar conversion work in #9654.Validation
_type_, and incomplete pointers.Aggregate CArg inputs with no initialized prototype take a safe TypeError path. This intentionally does not reproduce CPython's NULL-prototype crash.
Reference: CPython 3.15 ctypes conversion.
AI assistance
OpenAI Codex assisted with source analysis, implementation, reference-case preparation, review, and this description. Model version was not exposed by this runtime.
Summary by CodeRabbit
_as_parameter_.Noneand compatible pointer or array instances; values without an initialized pointer prototype now raise aTypeError.