From: Florent Monnier <fmonnier@linux-nantes.fr.eu.org>
To: caml-list@yquem.inria.fr
Cc: Oliver Bandel <oliver@first.in-berlin.de>
Subject: Re: [Caml-list] Give back a Pair from C to OCaml?
Date: Fri, 18 Jan 2008 00:58:50 +0100 [thread overview]
Message-ID: <200801180058.50904.fmonnier@linux-nantes.fr.eu.org> (raw)
In-Reply-To: <1200608794.478fd61aabcb5@webmail.in-berlin.de>
Hi,
> > Recently I've written a small tutorial about wrapping ocaml to C,
> > maybe you could find it usefull:
> > http://www.linux-nantes.org/~fmonnier/OCaml/ocaml-wrapping-c.php
>
> [...]
>
> You mentioned a "Double_wosize" in your tutorial,
> but I can't find such a thing in the reference manual.
Yes indeed, the macro Val_emptylist is not either in the manual, but if you
read the caml header files, you will find both of these macro. You can safely
use both of them in your project.
> Possibly you mean something like
> Wosize_val(Double_field(ml_array, 0))
> ???
> Would that work?
I don't know, I haven't tryed.
But for the "Double_wosize" macro, you can trust, I have asked on the other
ocaml list, so there's no problem there. And a lot of ocaml wrappers use it.
> Does int- and floats really need such a distinction?!
Yes, float arrays are not handle in the same way than the other values.
(it's explained in the manual.)
When I had read this part of the ocaml manual, I haven't found it very easy to
understand, so that's why I thought perhaps it is the same for other people,
and why I have tryed to make this little tutorial.
Regards
next prev parent reply other threads:[~2008-01-18 0:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-17 15:32 Oliver Bandel
2008-01-17 15:37 ` [Caml-list] " Berke Durak
2008-01-17 15:43 ` Till Varoquaux
2008-01-17 18:32 ` Oliver Bandel
2008-01-17 18:41 ` Richard Jones
2008-01-17 19:57 ` Oliver Bandel
2008-01-17 21:43 ` CAMLprim and co (was: Give back a Pair from C to OCaml?) Alain Frisch
2008-01-17 20:43 ` [Caml-list] Give back a Pair from C to OCaml? Florent Monnier
2008-01-17 21:05 ` Oliver Bandel
2008-01-17 22:26 ` Oliver Bandel
2008-01-17 23:58 ` Florent Monnier [this message]
2008-01-18 11:05 ` Richard Jones
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=200801180058.50904.fmonnier@linux-nantes.fr.eu.org \
--to=fmonnier@linux-nantes.fr.eu.org \
--cc=caml-list@yquem.inria.fr \
--cc=oliver@first.in-berlin.de \
/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