Add consts to PyUFuncGenericFunction declarations#99
Merged
efiring merged 2 commits intoTEOS-10:masterfrom Aug 28, 2022
Merged
Conversation
efiring
requested changes
Aug 28, 2022
Member
efiring
left a comment
There was a problem hiding this comment.
Thank you, good idea.
https://numpy.org/doc/stable/reference/c-api/ufunc.html#c.PyUFuncGenericFunction shows the order as int const *x rather than the presumably equivalent const int *x. Is there a reason you chose the second form rather than matching the docs and ufuncobject.h?
Contributor
Author
|
No reason. It is indeed probably better to be consistent, I will switch it. |
Contributor
Author
|
Should I squash commits? |
efiring
approved these changes
Aug 28, 2022
Member
|
I just used the "squash and merge" option of the merge button... |
hoodmane
added a commit
to pyodide/pyodide
that referenced
this pull request
Aug 30, 2022
GSW patch: TEOS-10/GSW-Python#99 galpy patch: jobovy/galpy#499 pyerfa patch: liberfa/pyerfa#89 astropy patch: astropy/astropy#13586 scipy patch: scipy/scipy#16924
ocefpaf
referenced
this pull request
Oct 13, 2022
ocefpaf
added a commit
to ocefpaf/GSW-Python
that referenced
this pull request
Oct 13, 2022
efiring
added a commit
to efiring/GSW-Python
that referenced
this pull request
Oct 13, 2022
This replaces TEOS-10#99 by putting the change in the code generator, not just in the generated code.
Member
|
It turns out this was missing a critical element: the change in the code generator, tools/make_ufuncs.py. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PyUFuncGenericFunctionhas typevoid (*)(char **, const npy_intp *, const npy_intp *, void *), sodimensionsandstepsshould be const. Otherwise compiling with-Wincompatible-function-pointer-typeswill fail:https://app.circleci.com/pipelines/github/hoodmane/pyodide/3783/workflows/3c5fdd0d-baf9-41b7-8dc8-56511ba2fdc0/jobs/45949