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
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-08-23 (12:59)
From: Stéphane Glondu <Stephane.Glondu@c...>
Subject: Re: [Caml-list] caml_copy_string
Le 23/08/2010 14:09, Florent Monnier a écrit :
>> Is there a way to get a string from C to OCaml without the caml_copy_string
>> function, or is there a version that doesn't copy the string?
> an alternative method is to provide a string from ocaml to c then c fills this 
> buffer, then you can save allocations by reusing the same buffer, see: [...]

You can also wrap your C pointer into bigarrays.