Replies: 1 comment
-
|
Same examples here about accessing struct fields: |
Beta Was this translation helpful? Give feedback.
0 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to consume the generated c wrappers for consumption with dart.
If i define a record
Rand an interfaceIwhich contains a methodMthat returns an instance of R.The generated C wrapper outputs look like
I -> struct DjinniWrapperI
R -> struct DjinniR
M-> struct DjinniRecordHandle * cw__I_get_R_instance(struct DjinniWrapperI * djinni_this);
The goal is to access 2 member fields that exist inside R once i've invoked M
Definition of R looks like this.
Question 1: How do you get
DjinniR *pointer fromDjinniRecordHandle *. Would casting the pointer be the right approach?Question 2: How can i access the fields
widthandheightwith an instance ofDjinniR *?Beta Was this translation helpful? Give feedback.
All reactions