From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 74696BC2A for ; Fri, 5 Aug 2005 16:40:26 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j75EePlM026795 for ; Fri, 5 Aug 2005 16:40:26 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA05003 for ; Fri, 5 Aug 2005 16:40:25 +0200 (MET DST) Received: from mail12.bluewin.ch (mail12.bluewin.ch [195.186.19.61]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j75EePQE026792 for ; Fri, 5 Aug 2005 16:40:25 +0200 Received: from [10.0.1.2] (81.62.18.180) by mail12.bluewin.ch (Bluewin 7.2.063) id 42D27D85003BEDC6; Fri, 5 Aug 2005 14:40:25 +0000 In-Reply-To: <5160.195.188.213.34.1123251372.squirrel@195.188.213.34> References: <5160.195.188.213.34.1123251372.squirrel@195.188.213.34> Mime-Version: 1.0 (Apple Message framework v733) X-Priority: 3 (Normal) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: caml-list@inria.fr Content-Transfer-Encoding: 7bit From: =?ISO-8859-1?Q?Daniel_B=FCnzli?= Subject: Re: [Caml-list] Constructing all float tuples in C Date: Fri, 5 Aug 2005 16:41:45 +0200 To: brjackson@blueyonder.co.uk X-Mailer: Apple Mail (2.733) X-Miltered: at concorde with ID 42F37A5A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 42F37A59.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; epfl:01 caml-list:01 allocating:01 unboxed:01 arrays:01 alloc:01 tuples:01 floats:01 floats:01 tuple:02 tuple:02 float:03 float:03 constructing:04 daniel:04 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 You are allocating an array of floats. But a tuple of floats is not an array of floats. In a tuple of floats, floats are boxed. Floats are unboxed only in records with float fields only or in arrays of floats. So it should your code should be something like : CAMLlocal1(t); t = alloc_tuple (3); Store_field (t, 0, copy_double(obj[0])); Store_field (t, 1, copy_double(obj[1])); Store_field (t, 2, copy_double(obj[2])); Daniel