No functionality for reinterpreting pointers #13

arnsholt opened this Issue Sep 4, 2012 · 2 comments

3 participants


Sometimes, it'll be necessary to decide which class to unmarshal a C pointer into on-the-fly. For example FROGGS' use case at

Basically, the exact nature of void *pixels is determined by the data in the format. I think the solution will be something along the lines of a new NQP op nqp::dyncall_cast_pointer($obj, Class) where Class is CStruct/CArray/CPointer REPRd, and the op basically hooks into the existing make_*_result logic in ops/nqp_dyncall.ops.

@FROGGS FROGGS added the Feature label Jul 6, 2014

These PR's were merged, and the sub nativecast provides this functionality now.

@FROGGS FROGGS closed this Jul 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment