caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Oliver Kania" <kania.oliver@googlemail.com>
To: caml-list@yquem.inria.fr
Subject: embedding ocaml from C++ -- PODs
Date: Mon, 2 Jul 2007 13:06:03 +0200	[thread overview]
Message-ID: <1262c4ee0707020406s7da99e37mc6706db8d35342a0@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 705 bytes --]

Hello,
the OCAML documentation gives good explanation about how call OCAML
functions from C.
However , what I want to do is the following. I have a C structure with many
fields.
I want to be able to initialize this structure both in C and in Ocaml and
want access to the same instance from both languages.
The structure could be a global object in OCAML and C. The important point
is that I want to have access to the very same
data and not to any copies, which means I want to pass a reference from
OCAML to C or vice versa.
More generally speaking, I would like to create objects in C and pass
references to these objects to the OCAML side and vice versa.
Its all about data flow between the two sides.

[-- Attachment #2: Type: text/html, Size: 737 bytes --]

             reply	other threads:[~2007-07-02 11:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-02 11:06 Oliver Kania [this message]
2007-07-02 11:48 ` [Caml-list] " Richard Jones
     [not found]   ` <1262c4ee0707020509h48d43e24s5e8902810cae7985@mail.gmail.com>
2007-07-03  8:59     ` Richard Jones
2007-07-05 20:43       ` Oliver Kania
2007-07-02 11:49 ` Thomas Fischbacher

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=1262c4ee0707020406s7da99e37mc6706db8d35342a0@mail.gmail.com \
    --to=kania.oliver@googlemail.com \
    --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;
as well as URLs for NNTP newsgroup(s).