• Will Thompson's avatar
    gdbus-codegen: emit GUnixFDLists if an arg has type 'h' · 4aba0356
    Will Thompson authored
    Previously, if a method was not annotated with org.gtk.GDBus.C.UnixFD
    then the generated code would never contain GUnixFDList parameters, even
    if the method has 'h' (file descriptor) parameters. However, in this
    case, the generated code is essentially useless: the method cannot be
    called or handled except in degenerate cases where the file descriptors
    are missing or ignored.
    
    Check the argument types for 'h', and if present, generate code as if
    org.gtk.GDBus.C.UnixFD annotation were specified.
    
    This change will break any existing code which refers to the (useless)
    wrappers for such methods. The workaround for such code is to add the
    org.gtk.GDBus.C.UnixFD annotation, which will cause the same generated
    code to be emitted before and after this change.
    
    If this is found to cause widespread problems, we can explore a
    different approach (perhaps emitting a warning from the code generator,
    or annotating the symbols as deprecated).
    
    #1726
    4aba0356