Version française
Home     About     Download     Resources     Contact us    
Browse thread
Int32 and boxing
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Int32 and boxing
On Mon, Aug 13, 2007 at 05:08:09AM +0100, Jon Harrop wrote:
> 
> Are int32s are boxed on a 64-bit machine?

Unfortunately yes:

# Obj.is_block (Obj.repr 1_l);;
- : bool = true
# Sys.word_size;;
- : int = 64

I deal a lot with int32 and int64 types when interfacing with other
languages, so this causes an annoyance.  I'm not sure what the
implications would be of having a different representation on 32 and
64 bit machines.  I guess Marshal would have to go through hoops for a
start.

Rich.

-- 
Richard Jones
Red Hat