Skip to content

Conversation

atsushieno
Copy link

This fixes #776

Before this change, we did not copy array contents back to the argument array for "const **" as it is regarded as immutable. But it in fact it mutable. This StackOverflow question describes it well.
https://stackoverflow.com/questions/4949254/const-char-const-versus-const-char

After this change, it will avoid copying if the parameter pointer itself is const.

…* const`s.

This fixes bytedeco#776

Before this change, we did not copy array contents back to the argument array
for "const **" as it is regarded as immutable. But it in fact it mutable.
This StackOverflow question describes it well.
https://stackoverflow.com/questions/4949254/const-char-const-versus-const-char

After this change, it will avoid copying if the parameter pointer itself is
const.
@saudet saudet requested a review from HGuillemet September 2, 2024 10:41
@atsushieno atsushieno changed the title Do not avoid copying array content for const ** arrays. Do that for * consts. [DO NOT MERGE] Do not avoid copying array content for const ** arrays. Do that for * consts. Sep 5, 2024
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.

@ByPtrPtr array argument for const pointer needs to be copied back from native call results
2 participants