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 AAA06030; Thu, 18 Jul 2002 00:09:28 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 AAA06193 for ; Thu, 18 Jul 2002 00:09:27 +0200 (MET DST) Received: from mail.eecs.harvard.edu (bowser.eecs.harvard.edu [140.247.60.24]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g6HM9Qf17437 for ; Thu, 18 Jul 2002 00:09:26 +0200 (MET DST) Received: by mail.eecs.harvard.edu (Postfix, from userid 32210) id 0CF3E54C794; Wed, 17 Jul 2002 18:09:26 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.eecs.harvard.edu (Postfix) with ESMTP id 0AFD654C5A7 for ; Wed, 17 Jul 2002 18:09:26 -0400 (EDT) Date: Wed, 17 Jul 2002 18:09:26 -0400 (EDT) From: Michael Tucker To: caml-list@inria.fr Subject: [Caml-list] Opaque pointers with camlidl Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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