caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* c binding question
@ 2006-02-22  8:09 Michael Wohlwend
  2006-02-22 21:37 ` [Caml-list] " Robert Roessler
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Wohlwend @ 2006-02-22  8:09 UTC (permalink / raw)
  To: caml-list

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-02-22 21:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-22  8:09 c binding question Michael Wohlwend
2006-02-22 21:37 ` [Caml-list] " Robert Roessler

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).