Skip to content

Draft: RFC: gdbus-codegen: make code with 'h' in signature compile on !unix

Marc-André Lureau requested to merge malureau/glib:gdbus-codegen into main

At this point, gdbus on windows doesn't support 'h' type and related functions. Just like other parts of the code already doing this when handling method call, let it fail at runtime if they are reached.

We could also '#ifdef G_OS_UNIX' functions that use GUnixFDList, since gdbus doesn't support it. May be, that doesn't necessarily make the user code easier to adapt, but probably more correct.

Better perhaps, we could have conditions on the XML schema translated in the generated code. That becomes more complex. It could be added later too.

Furthermore, in a not so distant future hopefully, D-Bus could learn to transfer FDs on Windows as well, so this extra condition handling might not be needed after all.

Merge request reports