Skip to content
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

llvm: Store only pointee types in byref_arg_types for pointer arguments #3017

Merged
merged 1 commit into from
Jul 28, 2024

Conversation

jvesely
Copy link
Collaborator

@jvesely jvesely commented Jul 28, 2024

'type' special attribute stores pointee type for pointers [0], array element type for arrays[1], but string type representation for other types.

Adjust builtin tests to not rely on byref_arg_types of non-pointer arguments. Cleanup codestyle in builtin tests.

Use np.sum() instead of sum() to keep the result in the same precision as the input array.

[0] https://docs.python.org/3/library/ctypes.html#ctypes._Pointer._type_
[1] https://docs.python.org/3/library/ctypes.html#ctypes.Array._type_

'_type_' special attribute stores pointee type for pointers [0],
array element type for arrays[1], but string type representation for other types.

Adjust builtin tests to not rely on byref_arg_types of non-pointer arguments.
Cleanup codestyle in builtin tests.

Use np.sum() instead of sum() to keep the result in the same precision
as the input array.

[0] https://docs.python.org/3/library/ctypes.html#ctypes._Pointer._type_
[1] https://docs.python.org/3/library/ctypes.html#ctypes.Array._type_

Signed-off-by: Jan Vesely <[email protected]>
Copy link

This PR causes the following changes to the html docs (ubuntu-latest-3.11):

No differences!

...

See CI logs for the full diff.

@jvesely jvesely merged commit 449e938 into PrincetonUniversity:devel Jul 28, 2024
36 checks passed
@jvesely jvesely deleted the devel-argfix branch July 28, 2024 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant