Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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-18 (07:05)
From: Dmitry Bely <dbely@m...>
Subject: Re: [Caml-list] CamlIDL and true abstract types
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,

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: