caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Robert Roessler <roessler@rftp.com>
To: Caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] A pair of "Interfacing with C" questions
Date: Thu, 21 Jul 2005 22:26:46 -0700	[thread overview]
Message-ID: <42E08396.4040502@rftp.com> (raw)
In-Reply-To: <20050721.205120.112787682.garrigue@math.nagoya-u.ac.jp>

Jacques Garrigue wrote:
> From: malc <malc@pulsesoft.com>
> 
>>>>I assume the other choices include int64, nativeint, or even int.
>>>
>>>If you look at mlvalues.h you will see that nativeint is define as
>>>long int. So this should be the natural format for a pointer.
>>
>>I don't think so, Win64 ABI has sizeof(long) == 4 and sizeof(void *) == 8.
> 
> 
> Aargh, they seem to like to break everything!
> Anyway, I suppose it just means that ocaml would have to define value
> as a long long int on Win64, to make it behave like other
> architectures. 
> The sources are full of casts from value to (value *) and back.
> Rather, this is going to be a pain to port many C libraries, that
> assume that you can convert between a long and a pointer and back.

I was worried about something like the Win64 silliness... ;)

Said silliness aside, I will go ahead and switch to nativeint - thanks.

Robert Roessler
roessler@rftp.com
http://www.rftp.com


  reply	other threads:[~2005-07-22  5:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-21  4:53 Robert Roessler
     [not found] ` <8210502975.20050721082753@moldavcable.com>
2005-07-21  5:44   ` [Caml-list] " Robert Roessler
2005-07-21 10:21 ` Jacques Garrigue
2005-07-21 10:29   ` malc
2005-07-21 11:51     ` Jacques Garrigue
2005-07-22  5:26       ` Robert Roessler [this message]
2005-07-22  9:31         ` Alexander S. Usov
2005-07-23 12:14     ` Xavier Leroy

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=42E08396.4040502@rftp.com \
    --to=roessler@rftp.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).