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 SAA20053; Mon, 2 Jun 2003 18:21:00 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA20052 for ; Mon, 2 Jun 2003 18:20:57 +0200 (MET DST) Received: from mail.speakeasy.net (mail10.speakeasy.net [216.254.0.210]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h52GKuT19234 for ; Mon, 2 Jun 2003 18:20:56 +0200 (MET DST) Received: (qmail 24587 invoked from network); 2 Jun 2003 16:20:54 -0000 Received: from unknown (HELO harry) ([64.81.246.34]) (envelope-sender ) by mail10.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 2 Jun 2003 16:20:54 -0000 Message-ID: <004601c32923$0269fb00$0200a8c0@harry> From: "Harry Chomsky" To: "Maas-Maarten Zeeman" , "Damien Doligez" Cc: "Chris Hecker" , "Mary F. Fernandez" , , "Jerome Simeon" References: Subject: Re: [Caml-list] Question about register_global_root Date: Mon, 2 Jun 2003 09:21:23 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4920.2300 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4920.2300 X-Spam: no; 0.00; caml-list:01 damien:01 val:01 interfacing:01 allocations:01 chris:01 caml:01 doligez:01 clearer:02 unit:03 wrote:03 explicitly:03 storing:03 root:07 objective:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Damien Doligez wrote: > On Sunday, June 1, 2003, at 12:50 PM, Maas-Maarten Zeeman wrote: > > The manual explicitly tells that register_global_root should be called > > before any valid value is stored in it for the first time, like > > Val_unit. See Rule 4 of Interfacing C with Objective Caml in the > > manual. > > I'm afraid Chris is right and the manual is wrong. > [...] > You must store a valid value before the first allocation that follows > register_global_root. I think that both Chris and the manual are right. The manual actually instructs the programmer to register a global root v "just before a valid value is stored in v for the first time". Key word: "just". In other words, as Damien says, no allocations are allowed between registration and storing a value. Apparently more than one reader of the manual has missed this detail. Would it be clearer to say "immediately before" instead of "just before"? ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners