caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Polymorphic calls to C
@ 2004-04-25 12:17 Jon Harrop
  2004-04-25 17:22 ` Richard Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Harrop @ 2004-04-25 12:17 UTC (permalink / raw)
  To: caml-list


Any recommendations on how to call C with polymorphic arguments from ocaml so 
that C can call ocaml functions back with the given data?

I figure I need to wrap the whole thing in a functor which will make the 
interface types explicit, i.e. specialise the 'a.

Cheers,
Jon.

-------------------
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] 2+ messages in thread

* Re: [Caml-list] Polymorphic calls to C
  2004-04-25 12:17 [Caml-list] Polymorphic calls to C Jon Harrop
@ 2004-04-25 17:22 ` Richard Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Jones @ 2004-04-25 17:22 UTC (permalink / raw)
  To: caml-list

On Sun, Apr 25, 2004 at 01:17:15PM +0100, Jon Harrop wrote:
> Any recommendations on how to call C with polymorphic arguments from
> ocaml so that C can call ocaml functions back with the given data?

The C function should just receive and store the "value", without
looking into it in any way, and pass it through to the callback.

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
MAKE+ is a sane replacement for GNU autoconf/automake. One script compiles,
RPMs, pkgs etc. Linux, BSD, Solaris. http://www.annexia.org/freeware/makeplus/

-------------------
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] 2+ messages in thread

end of thread, other threads:[~2004-04-25 17:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-25 12:17 [Caml-list] Polymorphic calls to C Jon Harrop
2004-04-25 17:22 ` Richard Jones

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).