<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2006/02/ee926bfa649e1a9b3e8554e36e4b508c"
  from="Michael Wohlwend &lt;micha-1@f...&gt;"
  author="Michael Wohlwend"
  date="2006-02-22T08:09:23"
  subject="c binding question"
  prev="2006/02/0c849ce0eedc6071b2d28d2387ff51c6"
  next="2006/02/389c8464853de078ab2eca5c28805a8d"
  next-in-thread="2006/02/527ddd47b86baf1da1e3ea70a1b7c810"
  prev-thread="2006/02/0c849ce0eedc6071b2d28d2387ff51c6"
  next-thread="2006/02/87a1efa1120fa1c00063e2d9e57ff280"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="c binding question">
<msg 
  url="2006/02/ee926bfa649e1a9b3e8554e36e4b508c"
  from="Michael Wohlwend &lt;micha-1@f...&gt;"
  author="Michael Wohlwend"
  date="2006-02-22T08:09:23"
  subject="c binding question">
<msg 
  url="2006/02/527ddd47b86baf1da1e3ea70a1b7c810"
  from="Robert Roessler &lt;roessler@r...&gt;"
  author="Robert Roessler"
  date="2006-02-22T21:36:55"
  subject="Re: [Caml-list] c binding question">
</msg>
</msg>
</thread>

<contents>
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

</contents>

</message>

