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 SAA00901; Fri, 24 May 2002 18:55:46 +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 SAA00965 for ; Fri, 24 May 2002 18:55:45 +0200 (MET DST) Received: from relay.rinet.ru (relay.rinet.ru [195.54.192.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g4OGtjf02724 for ; Fri, 24 May 2002 18:55:45 +0200 (MET DST) Received: (from uucp@localhost) by relay.rinet.ru (8.11.6/8.11.6) with UUCP id g4OG5EH07520 for caml-list@inria.fr; Fri, 24 May 2002 20:05:14 +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 17BHWT-0008Vt-00; Fri, 24 May 2002 20:02:33 +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> <1ycavsy2.fsf@mail.ru> <20020518234245.GA473@la.iki.fi> From: Dmitry Bely Date: Fri, 24 May 2002 20:02:33 +0400 In-Reply-To: <20020518234245.GA473@la.iki.fi> (Lauri Alanko's message of "Sun, 19 May 2002 02:42:45 +0300") Message-ID: 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: >> typedef [abstract] void* Foo; > > Yes, I read about that, but I consider it a hack, not proper support. I don't think so. IMHO the support is quite sufficient. > Since CamlIDL considers Foo completely opaque and doesn't even see that > it is a pointer, I cannot use pointer-specific attributes such as [ref], > [unique] and [ignore]. Why do you need these attributes for abstract types? How are you going to use them? What should they mean? > And saying that a type is void* when it really is > Foo* isn't even strictly legal, the way the stubs are implemented: > though conversion between void* and T* is legal for all object types T, > conversion between void** and T** isn't, yet this is the sort of type > punning that the generated stub code does. I don't see the real problem here. 1. Conversion that stub funtions perform is always safe. 2. You can compile the stub with your library C headers, and then there will be no conversion at all, because the original definition of type Foo will be used: test.idl typedef [abstract] void* Foo; test.h /* manually written */ #include "foo_native_definition.h" $ camlidl test.idl 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