8000 ENH: Pass input strides and dimensions by pointer to const by eric-wieser · Pull Request #13693 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

ENH: Pass input strides and dimensions by pointer to const #13693

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

Merged
merged 1 commit into from
Jun 1, 2019

Conversation

eric-wieser
Copy link
Member

This makes it possible to call these functions with constant data.
It also bakes the contract that the data passed via these pointers will not be changed into the function signatures.

This is backwards compatible, because T* can always be passed to a function expecting T const*.

Extracted from gh-13632

This makes it possible to call these functions with constant data.
It also bakes the contract that the data passed via these pointers will not be changed into the function signatures.

This is backwards compatible, because T* can always be passed to a function expecting T const*.
@mattip
Copy link
Member
mattip commented Jun 1, 2019

Using these newer headers with an older version of NumPy should be OK since we export C functions (with no signature) from the shared object, right?

@eric-wieser
Copy link
Member Author

If I understand your question, you're asking if this is an ABI breakage? Based on this question, I think it's guaranteed not to be.

@mattip
Copy link
Member
mattip commented Jun 1, 2019

Yes that was my question. A quick check of building cython + pandas seems to not generate new warnings, in spite of cython using the old declarations. Merging.

@mattip mattip merged commit 4b4eaa6 into numpy:master Jun 1, 2019
@eric-wieser eric-wieser deleted the const-correct-API branch June 1, 2019 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0