-
-
Notifications
You must be signed in to change notification settings - Fork 62
Also require ToGlibPtr<_, *const _> for the IsA<_> trait #249
Conversation
The macro is implementing both anyway, and we might need to be able to generate const pointers for various FFI API.
This now breaks type inference in various places. Do we want that? |
I sent a patch to fix this upstream in libosinfo so let's see if that get's merged instead: https://www.redhat.com/archives/libosinfo/2017-November/msg00008.html |
I don't found any usage of |
@zeenix Can you show example of function with |
@EPashkin see the link to my patch email above for such functions in upstream. Do you want me to paste the generated bad code? |
@zeenix Yes, I on windows, so I can't generate it easily, so please, show me bad code. |
.. with part of .gir-file for this function. |
Found working version for one function (with restore constness in sys):
Theoretically we can change |
@zeenix Gir updated to fix your problem, please check if it really helps. |
@EPashkin thanks so much. The patch to libosinfo was in the end accepted actually so it's not that much an issue anymore but good to have the fix for existing libosinfo releases. |
I tried to quickly test but there are currently other issues I'm facing with libosinfo-rs crate. I'll try to check later but feel free to close this issue. |
Use of 'const' parameter on object parameters is redundant, inconsistent (both internally and against other GObject libraries) and currently breaks the low-level Rust binding generator: gtk-rs/glib#249 Signed-off-by: Zeeshan Ali <zeeshan@kinvolk.io>
Outdated and not really needed anymore |
The macro is implementing both anyway, and we might need to be able to
generate const pointers for various FFI API.
@zeenix