Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
embedding ocaml from C++ -- PODs
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-07-02 (11:06)
From: Oliver Kania <kania.oliver@g...>
Subject: embedding ocaml from C++ -- PODs
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
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.