Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Robert Roessler <roessler@rftp.com>
To: dmitry grebeniuk <gds-mlsts@moldavcable.com>,
	Caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] A pair of "Interfacing with C" questions
Date: Wed, 20 Jul 2005 22:44:04 -0700	[thread overview]
Message-ID: <42DF3624.3000502@rftp.com> (raw)
In-Reply-To: <8210502975.20050721082753@moldavcable.com>

dmitry grebeniuk wrote:

> Shalom, Robert.
> ...
> 2) int32 -- good enough.  No limitations and drawbacks of ints/values,
> but it is boxed.

Thanks, dmitry - but this breaks as soon as the software is recompiled 
on a 64-bit implementation (AFAICT). :)

> 3) custom blocks with size sizeof(yourpointertype).  I think it is the
> best alternative: you can attach finalization function (and others, if
> you will need) to blocks.  In this function you can: a) automatically
> deallocate C-side objects, b) write debug info about objects that are
> not closed properly from Caml-side.

Yes, I use custom blocks when their functionality is needed - but here 
I really just want "opaque pointers"... I only need to store them in a 
Caml "value" and be able to hand them back across the Caml/C interface 
on demand.

Robert Roessler
roessler@rftp.com
http://www.rftp.com


  parent reply	other threads:[~2005-07-21  5:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-21  4:53 Robert Roessler
     [not found] ` <8210502975.20050721082753@moldavcable.com>
2005-07-21  5:44   ` Robert Roessler [this message]
2005-07-21 10:21 ` [Caml-list] " Jacques Garrigue
2005-07-21 10:29   ` malc
2005-07-21 11:51     ` Jacques Garrigue
2005-07-22  5:26       ` Robert Roessler
2005-07-22  9:31         ` Alexander S. Usov
2005-07-23 12:14     ` Xavier Leroy

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=42DF3624.3000502@rftp.com \
    --to=roessler@rftp.com \
    --cc=caml-list@inria.fr \
    --cc=gds-mlsts@moldavcable.com \
    /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