From: Erik de Castro Lopo <mle+ocaml@mega-nerd.com>
To: caml-list@inria.fr
Subject: C wrappers and callbacks from Ocaml to C and back to Ocaml
Date: Fri, 7 Aug 2009 07:17:31 +1000 [thread overview]
Message-ID: <20090807071731.bfd0d34b.mle+ocaml@mega-nerd.com> (raw)
Hi all,
I'm wrapping some C code that requires me to define a struct in Ocaml
like this:
type xt = { f : xt -> a }
and then pass the struct to C which stores it, and later the C needs
to find function f, call it from C, passing it the Ocaml xt struct.
Anyone have any clues on how to do this? I have most of the rest of
the C wrapper sorted out, its just this thats causing me any difficulty.
Cheers,
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
next reply other threads:[~2009-08-06 21:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-06 21:17 Erik de Castro Lopo [this message]
2009-08-06 23:38 ` [Caml-list] " Goswin von Brederlow
2009-08-07 4:23 ` Erik de Castro Lopo
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=20090807071731.bfd0d34b.mle+ocaml@mega-nerd.com \
--to=mle+ocaml@mega-nerd.com \
--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