From: "matthieu.dubuget@libertysurf.fr" <matthieu.dubuget@libertysurf.fr>
To: caml-list <caml-list@inria.fr>
Subject: [Caml-list] Interfacing C with Objective Caml
Date: Wed, 10 Sep 2003 12:26:07 +0200 [thread overview]
Message-ID: <HKZUBJ$D9A3F9C46FC675D76FB68502DB4A935A@tiscali.fr> (raw)
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
reply other threads:[~2003-09-10 10:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='HKZUBJ$D9A3F9C46FC675D76FB68502DB4A935A@tiscali.fr' \
--to=matthieu.dubuget@libertysurf.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).