Expose FfiPtrExt methods as public API
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.2k
- Forks
- 1k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 66
Description
what i want to have in my codebase:
let ptr = ffi::PyList_New(len);
let list: Bound<'_, PyList> = ptr.assume_owned(py).downcast_into_unchecked();
what i have:
let ptr = ffi::PyList_New(len);
let list: Bound<'_, PyList> = Bound::from_owned_ptr(py, ptr).downcast_into_unchecked();
where private assume_owned is just:
#[inline]
unsafe fn assume_owned(self, py: Python<'_>) -> Bound<'_, PyAny> {
Bound::from_owned_ptr(py, self)
}
any particular reason to make FfiPtrExt private while we have public Bound?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the private FfiPtrExt and comparing its assume_owned method with the shown Bound::from_owned_ptr call. Inspect how the method's visibility affects the public API. Done means the requested FfiPtrExt methods are publicly usable while preserving the existing ownership conversion behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100