Skip to content

Conversation

sweeneyde
Copy link
Member

@sweeneyde sweeneyde commented Apr 19, 2022

#30872 added some compiler warnings

@sweeneyde
Copy link
Member Author

Reading up on it more, this might not be 100% within the C spec.

void * and PyObject * could technically have different sizes.

Copy link
Member

@Fidget-Spinner Fidget-Spinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@markshannon
Copy link
Member

Reading up on it more, this might not be 100% within the C spec.

void * and PyObject * could technically have different sizes.

You cannot cast a function pointer to a normal pointer, or vice versa, but casting one function pointer to another is fine.
It might break strict aliasing, that is irrelevant here.

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.

4 participants