We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It's possible to get a non-const pointer from a const memoryview with no warnings and no casts
def f(const double[::1] x): cdef double *xptr = &x[0]
Constness should be preserved.
I think we probably have to make this a warning rather than an error - there's almost certain code depending on it
Linux
3.11.4
3.0.0 ish
scikit-learn/scikit-learn#27125
You do get a C warning (with GCC) but not a Cython warning
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
It's possible to get a non-const pointer from a const memoryview with no warnings and no casts
Code to reproduce the behaviour:
Expected behaviour
Constness should be preserved.
I think we probably have to make this a warning rather than an error - there's almost certain code depending on it
OS
Linux
Python version
3.11.4
Cython version
3.0.0 ish
Additional context
scikit-learn/scikit-learn#27125
You do get a C warning (with GCC) but not a Cython warning
The text was updated successfully, but these errors were encountered: