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
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: 2006-04-10 (21:18)
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?