From: Florian Hars <hars@bik-gmbh.de>
To: caml-list@inria.fr
Subject: Re: [Caml-list] CamlIDL documentation and COM issues
Date: Fri, 07 Jun 2002 15:46:17 +0200 [thread overview]
Message-ID: <3D00B929.5020002@bik-gmbh.de> (raw)
In-Reply-To: <8z5vq7pj.fsf@mail.ru>
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
next prev parent reply other threads:[~2002-06-08 15:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-04 16:28 Florian Hars
2002-06-04 17:23 ` Dmitry Bely
2002-06-07 13:46 ` Florian Hars [this message]
2002-06-08 19:16 ` Dmitry Bely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D00B929.5020002@bik-gmbh.de \
--to=hars@bik-gmbh.de \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox