From: "thierry BRAVIER" <thierry.bravier@dassault-aviation.fr>
To: caml-list@inria.fr
Subject: Re: Unsigned int ?!
Date: Fri, 23 Jun 2000 18:05:45 +0200 [thread overview]
Message-ID: <39538AD9.727CF77D@dassault-aviation.fr> (raw)
In-Reply-To: <87pupigd8k.fsf@beepbeep.dev33.cvf>
Luc MAZARDO a écrit:
> I would like to get the "caml unsigned int value" of an "unsigned int C
> value". Is there a way to do this ??
>
> I do the following, and it fails ...
>
> ---toto_stub.c---
> value toto(void)
> {
> return Val_int(get());
> }
> ------------
I think you should add:
value toto_external (value unit) { /* unit is necessary for this external
function */
return toto ();
}
> ---toto.mli---
> val toto : unit -> int ;;
> ------------
>
> ---toto.ml---
> external toto : unit -> int = "toto";;
Here you would rather write:
external toto : unit -> int = "toto_external";;
Anyway whether your version fails, returns a wrong result or anything else
cannot be predicted
since it is related to the function call protocol of your machine.
Or maybe I am wrong since I did not try this on my computer :-)
Hope this helps.
Thierry Bravier
prev parent reply other threads:[~2000-06-26 10:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-06-16 9:57 Luc MAZARDO
2000-06-19 15:51 ` Xavier Leroy
2000-06-23 16:05 ` thierry BRAVIER [this message]
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=39538AD9.727CF77D@dassault-aviation.fr \
--to=thierry.bravier@dassault-aviation.fr \
--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