I realized i already asked this question and Matthew Flatt had responded like this, for anyone wondering:
---
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.
---