Re: [racket-users] How to extract

2020-07-13 Thread Nate Griswold
Awesome, thanks! I actually just implemented it with the roundabout callback system, i think i might try out your suggestion though. Thanks for working on racket! Nate On Mon, Jul 13, 2020 at 12:20 PM Matthew Flatt wrote: > I see that there's not a good way right now, but here's a workaround

Re: [racket-users] How to extract

2020-07-13 Thread Matthew Flatt
I see that there's not a good way right now, but here's a workaround that uses information about the current layout: A cpointer value is implemented as a Chez Scheme record with either 1 field or 2 fields. There are 2 fields only when the cpointer has an offset as a result of `ptr-add`, so you can

[racket-users] How to extract

2020-07-13 Thread Nate Griswold
I had a question. In embedded racket, I am passing a _cpointer value back to c code by way of racket_apply's return value. Looking over https://docs.racket-lang.org/inside/cs-values_types.html , there appears to be a group of functions associated with extracting values from ptrs. I do not see one