You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a value is passed using Ctypes.string, then the OCaml string is copied into C-managed memory, and the copy is passed to C.
However, when passing a value using type Ctypes.(ptr string), I believe that no such copy happens, but I find the documentation a bit unclear on that point. If that is indeed the case, does this mean that types like ptr string or ptr (ptr string) are kind of not meaningful semantically?
This discussion was converted from issue #731 on April 26, 2023 09:19.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
If a value is passed using
Ctypes.string
, then the OCaml string is copied into C-managed memory, and the copy is passed to C.However, when passing a value using type
Ctypes.(ptr string)
, I believe that no such copy happens, but I find the documentation a bit unclear on that point. If that is indeed the case, does this mean that types likeptr string
orptr (ptr string)
are kind of not meaningful semantically?Beta Was this translation helpful? Give feedback.
All reactions