Probably you want to use `cast`. If you have an integer `addr` that
corresponds to an address, then

 (cast addr _uintptr _pointer)

casts it to a C pointer.

Matthew

At Wed, 7 Oct 2020 10:28:42 -0500, Nathaniel Griswold wrote:
> Related to a question I asked earlier, but this time at the racket side:
> 
> Is there any way to manually construct a cpointer with a raw pointer value? I 
> suppose this would mean being able to construct a chez record in racket.
> 
> My use case is that I have a remote process talking to a racket process, it 
> is 
> sending a pointer to some shared memory and I want to access that shared 
> memory. It’s an array of c structs with some integer data and each has a 
> pointer to some raw bytes.
> 
> Any way to do it?
> 
> Thanks
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/CDC4A5DF-6BE1-4B96-BF3A-0B19F2EB
> F0AC%40gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20201007150803.1b%40sirmail.smtps.cs.utah.edu.

Reply via email to