English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2007-08-13 (17:55)
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


Richard Jones
Red Hat