From: Michael Wohlwend <micha-1@fantasymail.de>
To: caml-list@inria.fr
Subject: c binding question
Date: Wed, 22 Feb 2006 09:09:55 +0100 [thread overview]
Message-ID: <200602220909.55592.micha-1@fantasymail.de> (raw)
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
next reply other threads:[~2006-02-22 8:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-22 8:09 Michael Wohlwend [this message]
2006-02-22 21:37 ` [Caml-list] " Robert Roessler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200602220909.55592.micha-1@fantasymail.de \
--to=micha-1@fantasymail.de \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox