From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 51B11BC69 for ; Wed, 22 Aug 2007 00:51:12 +0200 (CEST) Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l7LMp8ik028079 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Wed, 22 Aug 2007 00:51:12 +0200 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1INcZ2-0000HR-2T for caml-list@yquem.inria.fr; Tue, 21 Aug 2007 15:51:08 -0700 Message-ID: <12264892.post@talk.nabble.com> Date: Tue, 21 Aug 2007 15:51:08 -0700 (PDT) From: "andrew.p.cone" To: caml-list@yquem.inria.fr Subject: Returning caml values from C MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: andrew.p.cone@gmail.com X-j-chkmail-Score: MSGID : 46CB6C5C.000 on discorde : j-chkmail score : XX : 0/20 2 0.000 -> 2 X-Miltered: at discorde with ID 46CB6C5C.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; alloc:01 segfault:01 caml:02 caml:02 context:06 function:08 refers:08 refers:08 suspect:09 returning:11 returns:11 doesn't:12 i've:12 build:13 but:14 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 segfault. 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? Thanks, AC -- 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.