Version française
Home     About     Download     Resources     Contact us    
Browse thread
Converting C arrays to Ocaml arrays
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Michael Wohlwend <micha-1@f...>
Subject: Re: [Caml-list] Converting C arrays to Ocaml arrays
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