Closed carlostp12 closed 1 year ago
It's not possible to use a Java enum for pointers. In this case we need something like @Cast("Bar*") ShortPointer
and/or @Cast("Bar*") short[]
.
Hello Samuel, we implemented your first suggestion using the ShortPointer and it worked! Thanks a lot , we appreciate it.
I thought you hit a bug maybe so that's why I asked you to open an issue here, but in general you can ask questions on Gitter, that's fine. Thanks!
I want to report you a problem we encountering dealing with a pointer to an enum class, the code we have is like
void foo(Session & sess, ..., const Bar* bar);
where Bar is
enum class Bar : uint16_t{ VALUE1= 1, ... }
in Java part (javacpp) is translated to something like
pubic static native foo( @ByRef Session session, ... Bar bar)
It seems ignoring the pointer and the const specifiers. Also it is generating not compiling cpp code due to this dismatch of the pointer and value type. Is there a way to deal with this situation?
Thanks!