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 probably ignore that.
To extract the first field, assume that a record has the same layout as
a vector, so use `Svector_ref(p, 0)` to extra the field from the
cpointer `p`.
Then you can use `Sunsigned_value()` to convert that field value to a
pointer-sized integer, then case.
I might have some part of that wrong, but it should be close... Of
course, there should be better support for record-field access and
cpointer extraction, so I'll add to the API.
> --
> 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
racket-users...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/racket-users/CAM-xLPrKGgAgii7BjyfvCs6i0BmbMp0
> yoo09UoUF0nqVzX_CXQ%
40mail.gmail.com.