Browse thread
[Caml-list] Opaque pointers with camlidl
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Michael Tucker <mtucker@e...> |
| Subject: | [Caml-list] Opaque pointers with camlidl |
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