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

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to