Closed dan-jfisher closed 1 year ago
set
should probably take a &[u8]
and get
should probably take an &mut [u8]
. How to get gir
to understand that, I don't know though.
I definitely don't know how to get gir
to do that, so I vote for a manual extension. If you think that's reasonably I'm happy to make it.
Sure, its a good short term solution :)
The implementation looks good, but I don't like the names that much. Maybe get_bytes()
and set_bytes()
? Or get_raw()
and set_raw()
?
Also, could you add doc comments, and include a note there about preferring to use the typed interfaces when possible?
Released as 0.9.1 :rocket:
We should not be using pointers in safe interfaces. Also, we shouldn't manually add things to the generated files in
src/auto
.The proper way to do this is to tell
gir
how to transform those function arguments so it can generate the bindings automatically. Or, if we have to, we can add a manual extension trait :'(