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
Original bug ID: 7721 Reporter: sbleazard Status: new Resolution: open Priority: low Severity: feature Version: 4.06.0 Category: runtime system and C interface Monitored by: sbleazard
Bug description
When interfacing to C it is fairly common to store a C data structure in an ocaml value without needing any of the additional functionality provided by caml_alloc_custom. Some people recommend caml_alloc_string for this but that seems wrong.
Can caml_alloc_abstract(n) be added to allocate an n-byte abstract value? This could then be used when a simple block of data is required to store some C data that will not be compared nor serialised but will be garbage collected once out of scope.
Also, the manual does not really cover the Abstract_tag very much as I think this is what I need but it's unclear
The text was updated successfully, but these errors were encountered:
For now there is no support for making it easier to allocate Abstract values, with consensus that people should use Custom values instead. I'm closing this issue.
(Apologies @stevebleazard for the negative response to your work...)
Original bug ID: 7721
Reporter: sbleazard
Status: new
Resolution: open
Priority: low
Severity: feature
Version: 4.06.0
Category: runtime system and C interface
Monitored by: sbleazard
Bug description
When interfacing to C it is fairly common to store a C data structure in an ocaml value without needing any of the additional functionality provided by caml_alloc_custom. Some people recommend caml_alloc_string for this but that seems wrong.
Can caml_alloc_abstract(n) be added to allocate an n-byte abstract value? This could then be used when a simple block of data is required to store some C data that will not be compared nor serialised but will be garbage collected once out of scope.
Also, the manual does not really cover the Abstract_tag very much as I think this is what I need but it's unclear
The text was updated successfully, but these errors were encountered: