From: Luca de Alfaro <luca@dealfaro.org>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Re: How to wrap around C++?
Date: Mon, 8 Feb 2010 08:33:41 -0800 [thread overview]
Message-ID: <28fa90931002080833y2ca71705q319a3193d3e75d9f@mail.gmail.com> (raw)
In-Reply-To: <7b0bd61a1002080803n6cda4bc5g9eeb8d559538598f@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 862 bytes --]
I am trying another approach... it might make more sense for me to embed the
Ocaml into C++.
I have read the instructions, and it seems feasible, except that I have a
few questions:
- All I need to pass, as arguments, are int, float, string, and arrays of
these. Any example of how to deal with the arrays?
- How can I return arrays, in a way that C or C++ understands? How can I
return tuples, i.e., how can I return multiple values from Ocaml to C?
- Finally, do I need to worry about the Ocaml garbage collector, if I
call Ocaml from C/C++? Will it run every now and then? How can the garbage
collector know whether a value returned by an Ocaml function is still being
used in C/C++? How can I tell it that it is no longer used?
The problem I am trying to solve seems to be a can of worms from whichever
angle I take it...
Luca
[-- Attachment #2: Type: text/html, Size: 921 bytes --]
next prev parent reply other threads:[~2010-02-08 16:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-08 2:13 Luca de Alfaro
2010-02-08 4:06 ` Michael Ekstrand
2010-02-08 4:17 ` Michael Ekstrand
2010-02-08 16:03 ` [Caml-list] " Luca de Alfaro
2010-02-08 16:33 ` Luca de Alfaro [this message]
2010-02-08 17:44 ` Guillaume Yziquel
2010-02-08 17:57 ` Luca de Alfaro
2010-02-09 6:53 ` Basile STARYNKEVITCH
2010-02-08 17:54 ` Guillaume Yziquel
2010-02-09 0:25 ` Michael Ekstrand
2010-02-08 12:38 ` [Caml-list] " Guillaume Yziquel
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=28fa90931002080833y2ca71705q319a3193d3e75d9f@mail.gmail.com \
--to=luca@dealfaro.org \
--cc=caml-list@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