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

Properly differentiate between *mut and *const #282

Closed
konstin opened this issue Nov 19, 2018 · 1 comment
Closed

Properly differentiate between *mut and *const #282

konstin opened this issue Nov 19, 2018 · 1 comment
Labels

Comments

@konstin
Copy link
Member

konstin commented Nov 19, 2018

This is the definition of ToPyPointer:

pub trait ToPyPointer {
    fn as_ptr(&self) -> *mut PyObject;
}

With this approach, we implicitly cast from immutable to mutable, which should never be done. Instead ToPyPointer should have a as_mut_ptr and a as_ptr method.

@konstin
Copy link
Member Author

konstin commented Feb 7, 2019

Closing in favour of #342

@konstin konstin closed this as completed Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant