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
-
I'm trying to consume the generated c wrappers for consumption with dart.
If i define a record
R
and an interfaceI
which contains a methodM
that 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
width
andheight
with an instance ofDjinniR *
?Beta Was this translation helpful? Give feedback.
All reactions