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

Support hint sizes of arrays #444

Closed
zaikunzhang opened this issue Sep 16, 2023 · 3 comments · Fixed by #445
Closed

Support hint sizes of arrays #444

zaikunzhang opened this issue Sep 16, 2023 · 3 comments · Fixed by #445

Comments

@zaikunzhang
Copy link

zaikunzhang commented Sep 16, 2023

Dear Clang.jl maintainers,

First of all, thank you very much for this wonderful package!

This issue is motivated by the following discussion:

#443

It might be desirable to support double A[m*n], which is already supported by Clang, and is informative and user-friendly.

In PRIMA, such expressions are used in the public header prima.h. We will remove them for the moment in order to user Clang.jl. However, we do hope to restore them in the future when Clang.jl supports. See libprima/prima#76.

Thanks.

Zaikun

@Gnimuc
Copy link
Member

Gnimuc commented Sep 16, 2023

I just added a quick fix in #445. General rules for variable arrays are added, so variable arrays in the function prototype should work now. However, it's not trivial to map a C struct with variable arrays to a Julia type, which means #445 may introduce other bugs...

@Gnimuc
Copy link
Member

Gnimuc commented Sep 16, 2023

In fact, variable array structs are rarely used in a public C header, so I guess maybe it's OK to merge that PR.

@zaikunzhang
Copy link
Author

Thank you @Gnimuc very much for your swift response. No hurry. We can just remove the sizes for the moment while waiting for a solid implementation.

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 a pull request may close this issue.

2 participants