caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Interfacing C with Objective Caml
@ 2003-09-10 10:26 matthieu.dubuget
  0 siblings, 0 replies; only message in thread
From: matthieu.dubuget @ 2003-09-10 10:26 UTC (permalink / raw)
  To: caml-list

Hello Camlers,

I designed a simple OCaml module with a abstract type t and
functions
to create and manipulate values of that type.

type t
val create : int -> t
val use : t -> int
...

I now want to turn this module as a C dynamic link library under
Windows.

I do not know exactly how I should manage the ocaml values
created by
ocaml's 'create' function: passed to C (as pointer/handle),
and returned back
to ocaml when calling 'use' function.

I think I should register the values returned by 'create' in
order to
avoid them to be garbage collected between 'create' and
'use' calls,
but I don't know how to do this?

I should also provide a way to unregister those values?

I did not find (or understand ;-) how to achieve this using
a tool
(like CamlIDL or camouflage). It's why I'm trying to do it
by hand
first.

Thanks in advance

Matthieu Dubuget


********** L'ADSL A 20 EUR/MOIS********** 
Avec Tiscali, l'ADSL est à 20 EUR/mois. Vous pourrez chercher longtemps avant de trouver moins cher ! 
Pour profiter de cette offre exceptionnelle, cliquez ici : http://register.tiscali.fr/adsl/
Offre soumise à conditions.


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-09-10 10:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-10 10:26 [Caml-list] Interfacing C with Objective Caml matthieu.dubuget

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).