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
[Caml-list] GC and interoperability with C
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-07-10 (00:47)
From: Alexander V. Voinov <avv@q...>
Subject: Re: [Caml-list] GC and interoperability with C
Hi Jacques,

Jacques Garrigue wrote:
>      value *loca = (value*)malloc(sizeof(value));
>      value *locb = (value*)malloc(sizeof(value));
> Now you can put loca and locb directly in you C data structure, the
> real data being accessed by *loca, *locb.
> Of course, don't forget that you must unregister your global roots
> before freeing loca  and locb.

Sure. Thank you!

Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr