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 JAA24233; Sat, 18 May 2002 09:05:24 +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 JAA24245 for ; Sat, 18 May 2002 09:05:23 +0200 (MET DST) Received: from relay.rinet.ru (relay.rinet.ru [195.54.192.35]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g4I75Nr22166 for ; Sat, 18 May 2002 09:05:23 +0200 (MET DST) Received: (from uucp@localhost) by relay.rinet.ru (8.11.6/8.11.6) with UUCP id g4I75MK20531 for caml-list@inria.fr; Sat, 18 May 2002 11:05:22 +0400 (MSD) X-Envelope-To: caml-list@inria.fr Received: from bely.stormoff (BELY) [192.168.0.10] by stormoff with esmtp (Exim 3.12 #1 (Debian)) id 178yFG-0005b6-00; Sat, 18 May 2002 11:03:14 +0400 X-Comment-To: Lauri Alanko To: caml-list@inria.fr Subject: Re: [Caml-list] CamlIDL and true abstract types References: <20020517224534.A697@kruuna.Helsinki.FI> From: Dmitry Bely Date: Sat, 18 May 2002 11:03:17 +0400 In-Reply-To: <20020517224534.A697@kruuna.Helsinki.FI> (Lauri Alanko's message of "Fri, 17 May 2002 22:45:37 +0300") Message-ID: <1ycavsy2.fsf@mail.ru> User-Agent: Gnus/5.090007 (Oort Gnus v0.07) XEmacs/21.5 (bok choi, i586-pc-win32) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Lauri Alanko writes: > Hello. I recently learned of CamlIDL (thanks to the list), and tried it out. > After trying it out for a while, it seems to me that an absolutely essential > feature is missing: abstract types. > > With an abstract type I mean a type whose representation is known neither at > the C side nor in the caml world. Typically these are of the form: > > typedef struct Foo_ Foo; > > Where the actual definition of struct Foo_ is completely missing from public > headers, or even if it is not, its structure is supposed to be an > implementation detail. These sorts of types are needed often enough in many > bindings, and the Caml translation for Foo* should be clear: > > type foo > > Yet somehow there seems to be no direct way for doing this within > CamlIDL. Read the manual more carefully :-) typedef [abstract] void* Foo; is what you need. Don't miss also finalize() attribute; it may be quite useful for you. Hope to hear from you soon, Dmitry ------------------- 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