Request to make data pointer const in C++ new_from_memory_copy() #4124
VivitionDeveloper
started this conversation in
General
Replies: 1 comment 1 reply
-
This was already done with commit 75174cd. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It may be nice to make the C++ new_from_memory_copy data pointer const, as the underlying code calls vips_image_new_from_memory_copy, where the data pointer is already const, see . It then clearly expresses that the copy keeps its fingers off from the provided data pointer. Just as an suggestion, as I know have to perform a const_cast in our own code.
With this requested change, it also makes clear that new_from_memory (without copy) uses the provided data buffer (with responsibility to the caller for memory management).
I'm not sure whether I posted this question in the right category.
Beta Was this translation helpful? Give feedback.
All reactions