Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add method to clear WRITEABLE flag from PyArray #462

Merged
merged 2 commits into from
Oct 27, 2024

Commits on Oct 11, 2024

  1. Add safe interface to clear WRITEABLE flag

    The dynamic borrow checker for `PyReadwriteArray` understood the flag,
    but the crate offered no public way to set it.  General manipulation of
    the `flags` field is unsafe (things like `OWNDATA` should never be
    modified by hand), but flipping the `WRITEABLE` flag to `false` is safe.
    jakelishman committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    585d8a1 View commit details
    Browse the repository at this point in the history
  2. Add From<PyReadwriteArray> for PyReadonlyArray

    The ordering of drops is important for the dynamic checker, so this is a
    convenience for conversion.
    jakelishman committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    d8b477a View commit details
    Browse the repository at this point in the history