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
C Interface and float record
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-06-16 (14:57)
From: Christoph Bauer <christoph.bauer@l...>
Subject: RE: [Caml-list] C Interface and float record
> > type t = {
> >    f1 : float;
> >    f2 : float;
> >    f3 : float;
> > }
> > 
> > and a external C-function should allocate this as for the result.
> > 
> > Do I have to use
> > 
> >    caml_alloc(6, Double_array_tag)
> 
> caml_alloc(3 * Double_wosize, Double_array_tag)
> 
> would be better (portable between 32 and 64 bits).


Thanks Christophe,

i use Double_wosize and it works fine

Christoph