[racket] FFI questions

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Oct 6 02:21:37 EDT 2010

25 minutes ago, Neil Toronto wrote:
> Eli Barzilay wrote:
> > A byte string can be used as a pointer.
> 
> Oh! Well, what do you know? It works. I assumed a Racket object 
> wouldn't... okay. Smartness.
> 
> So what are my options with a function that allocates and returns an
> mp_limb_t*, where mp_limb_t is some unsigned integer type whose size
> depends on the platform?

A ctype is just an expression, you could use (if (foo) _int32 _int64).


> Can a list or a vector be used as a pointer? :)

(Yes, but probably not what you want.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the users mailing list.