From: Romain Beauxis <toots@rastageeks.org>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] C binding and GC interaction: storing values outside the heap
Date: Wed, 8 Sep 2010 00:06:57 -0500 [thread overview]
Message-ID: <201009080006.59336.toots@rastageeks.org> (raw)
In-Reply-To: <AANLkTi=VCN4+wpKYG_EWUNX5zsBAs5_G_1hb2Y3uJDsu@mail.gmail.com>
Hi,
Le mardi 7 septembre 2010 15:58:04, Paolo Donadeo a écrit :
> Any ideas or suggestions?
I'm sorry if I missed something obvious, but why don't you simply require the
callback in the CAMLprim function's arguments and then wrap it in the ML code?
Something like:
.ml:
type handler
type callback = foo -> bar
type t = handler * callback
val foo : handler -> callback -> bar = "caml_lua_foo"
let foo (h,c) = foo h c
.mli:
type t
val foo : t -> bar
Romain
prev parent reply other threads:[~2010-09-08 5:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-07 20:58 Paolo Donadeo
2010-09-07 21:12 ` [Caml-list] " Stéphane Glondu
2010-09-07 21:23 ` Paolo Donadeo
2010-09-07 21:48 ` Stéphane Glondu
2010-09-09 8:11 ` Paolo Donadeo
2010-09-07 22:53 ` Damien Doligez
2010-09-09 8:16 ` Paolo Donadeo
2010-09-08 5:06 ` Romain Beauxis [this message]
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=201009080006.59336.toots@rastageeks.org \
--to=toots@rastageeks.org \
--cc=caml-list@yquem.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