From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id CAA14015; Tue, 10 Jul 2001 02:47:12 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id CAA14011 for ; Tue, 10 Jul 2001 02:47:11 +0200 (MET DST) Received: from str12.sobor.org (adsl-63-198-183-99.dsl.snfc21.pacbell.net [63.198.183.99]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f6A0lAb17473 for ; Tue, 10 Jul 2001 02:47:10 +0200 (MET DST) Received: from quasar.ipa.nw.ru (anza.sobor.org [192.168.123.51]) by str12.sobor.org (Postfix) with ESMTP id AE21AAC065 for ; Mon, 9 Jul 2001 17:34:54 -0700 (PDT) Message-ID: <3B4A504F.D8A55E23@quasar.ipa.nw.ru> Date: Mon, 09 Jul 2001 17:46:07 -0700 From: "Alexander V. Voinov" Organization: Fear of the Lord is the beginning of wisdom X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: caml Subject: Re: [Caml-list] GC and interoperability with C References: <3B493A40.1B2985FE@quasar.ipa.nw.ru> <20010709155900C.garrigue@kurims.kyoto-u.ac.jp> <3B49C748.9CFB4E6@quasar.ipa.nw.ru> <20010710094419W.garrigue@kurims.kyoto-u.ac.jp> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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