caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Edgar A <edgar.factorial@gmail.com>
To: caml-list@inria.fr
Subject: [Caml-list] Getting some C values over to the OCaml side correctly
Date: Sun, 25 Sep 2016 01:02:26 -0700	[thread overview]
Message-ID: <090F68D4-7CA4-4091-BC5D-5F2C9BFB2AEC@gmail.com> (raw)

Greetings, 

I have some C values that I want to get over to the OCaml side using the FFI. 

Specifically I have `uint32_t`, `intptr_t` and `int32_t` and I’m not sure how to get it over to the OCaml side correctly. 

Would the uint32_t be expressed as a Int32.t? Do I really need to put an integer as block just to get it to the OCaml side, because of the 31 bit integers on the OCaml side right? 

Been looking for examples but can’t find any, example code greatly appreciated, the C side and the ml side please. 

Thank you, 
Edgar (Algebr) 




             reply	other threads:[~2016-09-25  8:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-25  8:02 Edgar A [this message]
2016-09-25  8:40 ` David Allsopp
2016-09-25  8:43   ` Edgar A
2016-09-25 12:28     ` David Allsopp
2016-10-06  9:19       ` Goswin von Brederlow

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=090F68D4-7CA4-4091-BC5D-5F2C9BFB2AEC@gmail.com \
    --to=edgar.factorial@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).