Skip to content

Import capsule as pointer #6065

@Person-93

Description

@Person-93

The PyCapsule type has an import method that returns a reference. But creating a reference from the capsule pointer might not be sound for all capsules. It might be useful to have an import_raw method that returns a PyResult<NonNull<c_void>>.

impl PyCapsule {
    fn import_raw(py: Python<'_>, name: &CStr) -> PyResult<NonNull<c_void>>);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions