Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004398OCamlCamlIDLpublic2007-09-19 18:162011-12-17 09:26
Reporteraij 
Assigned Toxleroy 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product Version3.10.0 
Target VersionFixed in Version 
Summary0004398: camlidl doesn't support managed strings [PATCH]
DescriptionThe [managed] attribute currently only works on bigarrays. This is a problem, because we are using an interface that returns malloc()ed strings. As of camlidl-1.05, the wrapper it generates copies the string and drops the reference to it.

Additional InformationI am attaching a patch to allow freeing arrays. (Only tested with strings so far.) Basically it just adds a .is_managed field to array_attributes, and calls free() on the array after copying it in array_c_to_ml.

A proper patch would probably involve some restructuring of idltypes.mli, so that it is an attribute on pointers, and so that arrays and bigarrays have an underlying pointer.

I don't know what the managed attribute should mean on function arguments, since I couldn't find any documentation on it, so it's just not handled now.
TagsNo tags attached.
Attached Filespatch file icon camlidl-1.05-aij-managed-arrays.patch [^] (2,517 bytes) 2007-09-19 18:16 [Show Content]

- Relationships

-  Notes
(0006347)
xleroy (administrator)
2011-12-17 09:26

I'm closing this PR because CamlIDL has been dormant since 2004. It now lives (or at least sleeps) on http://forge.ocamlcore.org/projects/camlidl/ [^] [^] . Anyone who still cares about CamlIDL after all these years is welcome to join the project on forge.ocamlcore.org and breathe some life in it.

- Issue History
Date Modified Username Field Change
2007-09-19 18:16 aij New Issue
2007-09-19 18:16 aij File Added: camlidl-1.05-aij-managed-arrays.patch
2007-11-10 14:13 xleroy Status new => assigned
2007-11-10 14:13 xleroy Assigned To => xleroy
2011-12-17 09:26 xleroy Note Added: 0006347
2011-12-17 09:26 xleroy Status assigned => closed
2011-12-17 09:26 xleroy Resolution open => won't fix


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker