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 - finalizing cows without COM!
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-04-19 (03:13)
From: Jakob Lichtenberg <jl@i...>
Subject: Re: [Caml-list] camlidl - finalizing cows without COM!
Dear Christopher,

Thanks a lot for your help, I can now produce and garbage collect all the
cows I would ever dream of!

There are still a couple of open issues.  My current favourite would be:

Who declares what?!?

The CamlIDL User's manual Sec. 3.8 tells me what prototypes to implement: a
c2ml and an ml2c function.  And then I can use them using the following IDL
declaration (in cow.idl):
  typedef [abstract,c2ml(cow_c2ml), ml2c(cow_ml2c)] int cow;

However I need to declare and implement cow_c2ml and cow_ml2c, right?  I
cannot do that directly in the IDL file since the IDL types does NOT contain
the 'value' type.  I needed to put them in a separate module and then
include them using a quote declaration:

  quote(h,"#include \"cow_marshalling.h\"")

That opened up for a bunch of new entertaining stuff since the c2ml and ml2c
declarations uses an (according to the manual 'internal'?!?) type
'camlidl_ctx' which is declared in the camlidlruntime.h header file.  A file
that I as a 'user' to the best of my knowledge should not include

Anyway, having made a bunch of strange declarations and includes everything
now basically ROCKS.  CamlIDL have cut 50% of my source code and made
everything so much cooler, thanks Xavier Leroy and Christopher!!!

- Jakob

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