Skip to content

Downcasting of return values #538

Answered by saudet
nyholku asked this question in Q&A
Jan 9, 2022 · 2 comments · 11 replies
Discussion options

You must be logged in to vote

We can easily do a reinterpret cast from anything to anything else with the constructors that accept a Pointer argument, like this one:
http://bytedeco.org/javacpp/apidocs/org/bytedeco/javacpp/BytePointer.html#BytePointer-org.bytedeco.javacpp.Pointer-
Or do you mean how to have it do that automatically? That's not something JavaCPP can do automatically right now, but you can provide your own helper methods for that, that's very straightforward. I'm not sure what your question is... Could you elaborate?

PS It seems I somehow miss use this Discussions mechanism in github as I cannot mark any of my threads as answered...

Don't mind, just do it when you figure it out :)

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
10 replies
@saudet
Comment options

@nyholku
Comment options

@saudet
Comment options

@nyholku
Comment options

@saudet
Comment options

Answer selected by saudet
Comment options

You must be logged in to vote
1 reply
@saudet
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants