[
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 Wohlwend <micha-1@f...> |
| Subject: | c binding question |
Hi, I want to make an interface to a c-lib in which some function take a char* as a parameter and store this paramenter in their internal variables. I have done this this way: I copy the ocaml-string to a new c-string and I allocated a custom block to store the abstract datatype of the lib together with the allocated char* for that string. The finalize function of that custom block releases the allocated memory of the string and cleans up the rest... Is this the correct way to do this? thanks, Michael