caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Richard W.M. Jones" <rich@annexia.org>
To: Goswin von Brederlow <goswin-v-b@web.de>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Implementation for a (nearly) typesafe shallow option type and a compiler bug?
Date: Tue, 8 May 2012 19:47:56 +0100	[thread overview]
Message-ID: <20120508184756.GA18493@annexia.org> (raw)
In-Reply-To: <87sjfd31z9.fsf@frosties.localnet>

On Sun, May 06, 2012 at 02:53:14PM +0200, Goswin von Brederlow wrote:
> The common problem here is that NULL is not unique for each type. So I
> thought of a way to make it unique.

I don't know whether or not it'll solve your problem, but there is
another way to generate unique pointers that the OCaml runtime won't
follow.  That is, in C create a pointer to some static item:

  static char foo;
  value get_null (value ignored) { return &foo; }

  external get_null : unit -> null = "get_null" "noalloc"

Rich.

-- 
Richard Jones
Red Hat

  parent reply	other threads:[~2012-05-08 18:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-06 12:53 Goswin von Brederlow
2012-05-06 13:11 ` Gabriel Scherer
2012-05-06 15:42   ` Goswin von Brederlow
2012-05-08 18:47 ` Richard W.M. Jones [this message]
2012-05-08 18:52   ` Richard W.M. Jones

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=20120508184756.GA18493@annexia.org \
    --to=rich@annexia.org \
    --cc=caml-list@inria.fr \
    --cc=goswin-v-b@web.de \
    /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;
as well as URLs for NNTP newsgroup(s).