From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=AWL,SPF_SOFTFAIL autolearn=disabled version=3.1.3 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 195F6BBAF for ; Tue, 16 Jun 2009 16:57:15 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlgCABNQN0pVnoqDkGdsb2JhbACBT5cDAQEBAQkJDAcTBbwdhA0FiFs X-IronPort-AV: E=Sophos;i="4.42,229,1243807200"; d="scan'208";a="28185855" Received: from mail186.messagelabs.com ([85.158.138.131]) by mail2-smtp-roc.national.inria.fr with SMTP; 16 Jun 2009 16:57:14 +0200 X-VirusChecked: Checked X-Env-Sender: christoph.bauer@lmsintl.com X-Msg-Ref: server-11.tower-186.messagelabs.com!1245164230!14975660!1 X-StarScan-Version: 6.0.0; banners=-,-,- X-Originating-IP: [213.68.136.230] Received: (qmail 11914 invoked from network); 16 Jun 2009 14:57:10 -0000 Received: from kaiserslautern1.lms-gmbh.de (HELO mail-in.lmsintl.com) (213.68.136.230) by server-11.tower-186.messagelabs.com with SMTP; 16 Jun 2009 14:57:10 -0000 Received: from KL-SRV57.lmsintl.com (unknown [10.2.100.57]) by mail-in.lmsintl.com (Postfix) with ESMTP id 1396843C005; Tue, 16 Jun 2009 17:20:42 +0200 (CEST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: [Caml-list] C Interface and float record Date: Tue, 16 Jun 2009 16:57:07 +0200 Message-ID: In-Reply-To: <20090616.114419.669093565955563034.Christophe.Troestler+ocaml@umons.ac.be> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [Caml-list] C Interface and float record Thread-Index: AcnuZwi4P/w3Xt+8QPKPEWVmbCJoSAAK2c6w References: <20090616.114419.669093565955563034.Christophe.Troestler+ocaml@umons.ac.be> From: "Christoph Bauer" To: "Christophe TROESTLER" Cc: "OCaml Mailing List" X-Spam: no; 0.00; alloc:01 alloc:01 wosize:01 christophe:01 wosize:01 caml-list:01 caml:02 caml:02 external:03 float:03 float:03 christoph:04 christoph:04 bits:05 interface:06 > > type t =3D { > > f1 : float; > > f2 : float; > > f3 : float; > > } > >=20 > > and a external C-function should allocate this as for the result. > >=20 > > Do I have to use > >=20 > > caml_alloc(6, Double_array_tag) >=20 > caml_alloc(3 * Double_wosize, Double_array_tag) >=20 > would be better (portable between 32 and 64 bits). Thanks Christophe, i use Double_wosize and it works fine Christoph