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 RAA15766; Sat, 8 Jun 2002 17:57:39 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA15704 for caml-list@pauillac.inria.fr; Sat, 8 Jun 2002 17:57:39 +0200 (MET DST) 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 PAA27349 for ; Fri, 7 Jun 2002 15:46:24 +0200 (MET DST) Received: from grisu.bik-gmbh.de (grisu.bik-gmbh.de [194.233.237.82]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g57DkNn00696 for ; Fri, 7 Jun 2002 15:46:24 +0200 (MET DST) Received: from bik-gmbh.de (prony.bik-gmbh.de [194.233.237.133]) by grisu.bik-gmbh.de (8.11.3/8.11.1) with ESMTP id g57DkN598914 for ; Fri, 7 Jun 2002 15:46:23 +0200 (CEST) (envelope-from hars@bik-gmbh.de) Message-ID: <3D00B929.5020002@bik-gmbh.de> Date: Fri, 07 Jun 2002 15:46:17 +0200 From: Florian Hars User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.0.0) Gecko/20020529 X-Accept-Language: de-de, en-us, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] CamlIDL documentation and COM issues References: <3CFCEAB6.5040204@hars.de> <8z5vq7pj.fsf@mail.ru> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Dmitry Bely wrote: > It's easy: > typedef [abstract,finalize(FooClose)] void* FooHandle; Nice, now all I need is a debian package for camlidl 1.04 to get this working :-). But there are more things I cannot figure out reading the manual: The library I want to use contains constructs like typedef struct { int numThings; int *the1stThings; int *the2ndThings; /* more stuff */ } FOOThing; Can I translate this to struct FOOThing { [length_is(numThings)] int (*the1stThings) []; [length_is(numThings)] int (*the2ndThings) []; /* more stuff */ }; Will this work as expected? From a quick look at the machine generated C code, the answer seems to be yes, but the manual doesn't say much about how camlidl deals with the array/pointer ambiguity in C, except that it mentions (*x)[] as an example for the syntax of type declarations. And what is the difference between length_is() and size_is(), except that the latter is checked after the former? And who has to do the name mangling? FOOThing is no valid type or variable name in ocaml. It looks like camlidl just converts the first character to lowercase, but can I control this better? I can use [mlname="thing"] on struct fields, something like int [quote("_ret=FOOOperate(args...)")] operate(args...); for functions, but what about structs and typedefs? Wouldn't it be usefull to generalize the mlname attribute to all cases where names on both sides of the translation might be different? Yours, Florian. ------------------- 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