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
Returning caml values from C
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-08-21 (22:51)
From: andrew.p.cone <andrew.p.cone@g...>
Subject: Returning caml values from C

Hi everybody.

I have a C function that, given a list of caml values, returns a certain
sublist of those values.

Currently, I have the C code build up a caml list using caml_alloc and
Store_field. But when I try to access those values in caml, I get a

I suspect the GC is deleting the input list, because it doesn't realize I've
made something new that refers to some of those values. How do I tell the GC
that something refers to some value?


View this message in context: http://www.nabble.com/Returning-caml-values-from-C-tf4308363.html#a12264892
Sent from the Caml Discuss2 mailing list archive at Nabble.com.