From: Shishir Ramam <sramam@yahoo.com>
To: caml list <caml-list@inria.fr>
Subject: [Caml-list] Caml idl and structure typedefs.
Date: Wed, 16 Jun 2004 10:58:59 -0700 (PDT) [thread overview]
Message-ID: <20040616175859.51961.qmail@web52805.mail.yahoo.com> (raw)
Hi,
I am running into some troubles with converting
C data-structures from C-to-Ocaml using camlidl.
A common C coding convention is to use
struct definitions of the form -
<test.idl> ---------
typedef struct a {
int x;
int y;
} a;
</test.idl> --------
Using CamlIdl, this results in a conversion to
<test.ml> ---------
(* File generated from test.idl *)
type a = {
x: int;
y: int;
}
and a = a
</test.ml> ---------
which gives me the following error -
"Multiple definition of the type name a.
Names must be unique in a given structure or
signature."
One method that comes to mind is to prepend and "_"
for the struct definition when such a case is
encounterd. The trick is that this only needs to be
done for the struct definition in ocaml, and the
wrapper code should continue to use the old
name for the C binding. Anything else would
require modification of the C code too - a
problem of some magnitude in itself.
I do not understand the implementation of camlidl
very well, but given a little help, am willing to
make necessary modifications.
Was wondering if anyone would be willing to provide
pointers.
thanks,
-shishir
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo
-------------------
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
reply other threads:[~2004-06-16 17:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20040616175859.51961.qmail@web52805.mail.yahoo.com \
--to=sramam@yahoo.com \
--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