caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Michael Tucker <mtucker@eecs.harvard.edu>
To: caml-list@inria.fr
Subject: [Caml-list] Opaque pointers with camlidl
Date: Wed, 17 Jul 2002 18:09:26 -0400 (EDT)	[thread overview]
Message-ID: <Pine.BSF.4.44.0207171759380.61599-100000@bowser.eecs.harvard.edu> (raw)

Hi,

  I am trying to write an O'Caml program that interfaces with Berkeley DB
(which has a C interface). Some of the calls include arguments that are
pointers to opaque structures -- that is, I pass a pointer, the server
goes to the address, fills it, but then my only use of it is to pass it
back to the server. In other words, I will not be examining or altering
the contents, just holding it to preserve state. Some of these structures
are fairly complex, and may require a lot of code-schlepping to get into
IDL format, so it would be great if I could signify that there is a truly
opaque (I don't care about its layout, I just know the size) structure
coming into O'Caml. I looked in the camlidl manual, but didn't see any
attributes that looked relevant. I would like the data to be transferred
and stored in OCaml, but I am fine with it being stored as raw data (a
string?). Is there anything like this that will let me effectively pickle
and unpickle structures without supplying any information beyond their
size?

I'm sure I'm fouling up my explanation, so feel free to send questions...
I am just hoping that someone has run into a similar situation in the
past!

Thanks,
Mike

-------------------
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:[~2002-07-17 22:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-17 22:09 Michael Tucker [this message]
2002-07-17 23:29 ` Jacques Garrigue
2002-07-17 23:30   ` Alexander V.Voinov
2002-07-18  2:19 ` Yaron M. Minsky
2002-07-18  2:24   ` Michael Tucker
2002-07-18  8:25   ` Olivier Andrieu

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=Pine.BSF.4.44.0207171759380.61599-100000@bowser.eecs.harvard.edu \
    --to=mtucker@eecs.harvard.edu \
    --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;
as well as URLs for NNTP newsgroup(s).