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 3C405BB81 for ; Mon, 10 Apr 2006 23:18:48 +0200 (CEST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by concorde.inria.fr (8.13.0/8.13.0) with SMTP id k3ALIlWO005741 for ; Mon, 10 Apr 2006 23:18:48 +0200 Received: (qmail invoked by alias); 10 Apr 2006 21:18:47 -0000 Received: from p54A315B6.dip0.t-ipconnect.de (EHLO [192.168.2.136]) [84.163.21.182] by mail.gmx.net (mp040) with SMTP; 10 Apr 2006 23:18:47 +0200 X-Authenticated: #20477425 From: Michael Wohlwend To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Converting C arrays to Ocaml arrays Date: Mon, 10 Apr 2006 23:21:11 +0200 User-Agent: KMail/1.9.1 References: In-Reply-To: X-Face: S)[vu%Bha1d&ej9GfwAq~7C}A,y[B.uS}+D6'hb~xPwsxymw$fnCOaMe<=?utf-8?q?*bnUajSBR=5Fm=3FR=0A=09?=@V3;iX8[A}z`.%pEQ1r7iZhN8#ktTCBQ}&mkx>=RH&l|l6\]NZI@ MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200604102321.11308.micha-1@fantasymail.de> X-Y-GMX-Trusted: 0 X-Miltered: at concorde with ID 443ACBB7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; arrays:01 ocaml:01 arrays:01 alloc:01 pointers:01 alloc:01 ocaml:01 ffi:01 bigarray:01 cheers:01 2006:98 wrote:01 caml-list:01 opengl:01 caml:02 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 On Monday 10 April 2006 22:42, Chris Campbell wrote: > Is the correct way then to alloc another array, then fill it with the > pointers in the original array then call caml_alloc_array? That seems > a bit redundant, although I think I might understand why ocaml ffi > might ask for this format. Is there a macro to help with this, or a > better way? no clue about the OpenGL stuff, but can't you just make a Bigarray of the c-array? Without copying anything? cheers Michael