-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Fix build warnings in NEPs #18078
Fix build warnings in NEPs #18078
Conversation
intp stride[niter]; | ||
{intp indexstride;} #if (flags&FLAGS_HASINDEX); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what the intent here was, I assume what I replaced it with but this looked pretty weird.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you got it right, but it is a bit odd to use the same name for two different structures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't work out what your comment is referring to @charris. What name and which structures?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking in the code, there doesn't seem to be anything like this, so I expect it has marginal relevance to how the implementation ended up. The closest thing I could find is
/* Internal-only AXISDATA MEMBER ACCESS. */
struct NpyIter_AD {
npy_intp shape, index;
npy_intp ad_flexdata;
};
Where ad_flexdata
seems to be either a stride, or a pointer stored as an integer. It's probably going to cause trouble eventually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eric-wieser It looked like struct axis_data
could contain different entries depending on a flag, I think NpyIter_AD
has the same dual use of ad_flexdata
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for checking. I think no need to look into it more. Just to document why I changed it:
- it caused a Sphinx warning
- it caused code highlighting for the whole code block to go missing
Thanks Ralf. |
No description provided.