Recursive Struct and StructRef #305
Unanswered
aramesh117
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
We have a situation of structs that I am not able to resolve easily through jnr-ffi. Here's a similar example:
When I try to define the equivalent JNR classes by using inner for A.b and StructRef for B.as, I run into an infinite loop. Seems like this is because JNR calls the constructor of A which initializes B's constructor, which initializes A's constructor even though B.as is a pointer.
How would you recommend resolving this? Thank you! I would imagine this is pretty common.
Beta Was this translation helpful? Give feedback.
All reactions