Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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!

Alexander
-------------------
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