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

export jl_alloc_array_nd, re-add convenience wrappers #52248

Merged
merged 3 commits into from
Dec 4, 2023

Conversation

benlorenz
Copy link
Contributor

This is used in an example here in the docs https://docs.julialang.org/en/v1.11-dev/manual/embedding/#Multidimensional-Arrays and needed to adapt to the removed jl_alloc_array_2d (#51319).

I also added inline convenience wrappers for jl_alloc_array_2d and jl_alloc_array_3d to un-break existing code, both functions were removed in the Memory PR in favor of the _nd variant. If this is undesired I can remove them again and only keep the new export.

@Taaitaaiger
Copy link
Contributor

Could you also export the 2d and 3d constructors instead of marking them as static inline? I use both those functions in jlrs and dealing with static inlines is kind of awkward.

@benlorenz
Copy link
Contributor Author

Could you also export the 2d and 3d constructors instead of marking them as static inline? I use both those functions in jlrs and dealing with static inlines is kind of awkward.

I think that's reasonable since they were exported before, done in 4e6e1a7.

@Taaitaaiger
Copy link
Contributor

Thanks, I appreciate it!

@fingolfin
Copy link
Contributor

It would be great to have this, to unbreak some JLLs resp. allow us to fix them w/o too much of a headache.

@maleadt maleadt merged commit f761860 into JuliaLang:master Dec 4, 2023
7 checks passed
@benlorenz benlorenz deleted the bl/alloc_array_nd branch December 4, 2023 15:13
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.

5 participants