caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Mary Fernandez <mff@research.att.com>
To: skaller@users.sourceforge.net
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] XQuery Implementation: Galax version 0.5.0 available
Date: Thu, 17 Feb 2005 08:17:05 -0500	[thread overview]
Message-ID: <1108646225.5058.91.camel@localhost.localdomain> (raw)
In-Reply-To: <1108603164.5483.374.camel@pelican.wigram>

It's not hard, really, just tedious. Unfortunately,
the Caml IDL tool only generates wrapper code for
calling C from O'Caml, not vice versa, so we
write that code by hand.   In short:

C_API_stub.c - contains our C API. This code handles 
  converting C values to O'Caml values, setting up
  actual arguments to O'Caml functions, then calling
  the O'Caml callback functions.  There's some messy
  memory/heap management code in here too

Caml_API_stub.ml - contains wrapper functions that
  are called from C API.  These functions are registered
  using the Callback module.  They call our real Caml API.
  
We create a shared library that contains our Caml library,
the C_API stub, and the O'Caml runtime system.  (IT's BIG!)
And that gets linked with the user's C program.

I hope that makes sense.
Mary
On Wed, 2005-02-16 at 20:19, skaller wrote:
> On Thu, 2005-02-17 at 11:40, Mary Fernandez wrote:
> 
> > Galax provides APIs for O'Caml, C, and Java and is implemented in
> > O'Caml.
> 
> I'm curious how you provide a CAPI for Ocaml code?
-- 
Mary Fernandez <mff@research.att.com>
AT&T Labs - Research


      reply	other threads:[~2005-02-17 13:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-17  0:40 Mary Fernandez
2005-02-17  1:19 ` [Caml-list] " skaller
2005-02-17 13:17   ` Mary Fernandez [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=1108646225.5058.91.camel@localhost.localdomain \
    --to=mff@research.att.com \
    --cc=caml-list@inria.fr \
    --cc=skaller@users.sourceforge.net \
    /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).