English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] CamlIDL and true abstract types
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-05-23 (20:34)
From: Lauri Alanko <la@i...>
Subject: Re: [Caml-list] CamlIDL and true abstract types
On Sat, May 18, 2002 at 11:03:17AM +0400, Dmitry Bely wrote:
> Read the manual more carefully :-)
> typedef [abstract] void* Foo;

Yes, I read about that, but I consider it a hack, not proper support.
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]. 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.

Lauri Alanko
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