-
Notifications
You must be signed in to change notification settings - Fork 2
Cull through ffi/**/*.rb and ensure string/pointer soundness #25
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
There are quite a few GDAL functions that return strings that shouldn't be modified once returned to Ruby. For some of these, I've used :strptr as a return type, but after some more reading, that doesn't seem right.
In the Types page, it says:
:stringshould be considered to beconst char *and the Ruby string must not be changed as long as it’s accessed by the library. If the string buffer shall be modified from C or Ruby side, use:pointerandFFI::MemoryPointerinstead.
I think the attach_function calls should return :string, then in the wrapper functions, those values should be made frozen.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working