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 KAA02386; Thu, 29 Mar 2001 10:36:54 +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 KAA03325 for ; Thu, 29 Mar 2001 10:36:54 +0200 (MET DST) Received: from dpt-info.u-strasbg.fr (dpt-info.u-strasbg.fr [130.79.6.1]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f2T8aq912756 for ; Thu, 29 Mar 2001 10:36:52 +0200 (MET DST) Received: from lambda.u-strasbg.fr (lambda.u-strasbg.fr [130.79.90.63]) by dpt-info.u-strasbg.fr (8.9.3/8.9.3) with ESMTP id KAA10713; Thu, 29 Mar 2001 10:35:31 +0200 Received: from luther by lambda.u-strasbg.fr with local (Exim 3.22 #1 (Debian)) id 14iXul-0006BH-00; Thu, 29 Mar 2001 10:36:19 +0200 Date: Thu, 29 Mar 2001 10:36:19 +0200 To: Jean-Christophe Filliatre Cc: David Fox , caml-list@inria.fr Subject: Re: [Caml-list] Quick question - accessing variant value from C Message-ID: <20010329103619.A23630@lambda.u-strasbg.fr> References: <15042.59930.557493.133492@pc803> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.15i In-Reply-To: <15042.59930.557493.133492@pc803>; from Jean-Christophe.Filliatre@lri.fr on Thu, Mar 29, 2001 at 09:54:02AM +0200 From: Sven LUTHER Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, Mar 29, 2001 at 09:54:02AM +0200, Jean-Christophe Filliatre wrote: > > Hi, > > You can use the macros Is_long / Is_block to discriminate between Null > and Address, since the first one is represented as an integer and the > second one as a structured block (in the later case, you can then > access the string with the Field macro). Additionally, some reading of the "Interfacing C with Objective Caml" chapter of the ocaml documentation is a must read for this, far more inmportant than the mlvalues.h file, i think. Friendly, Sven Luther ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr