mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-16 04:28:05 +02:00
gdbus-codegen: don't sort args in --interface-info-body
Previously, method and signal arguments were sorted by name, which (assuming you don't happen to give your arguments lexicographically-ordered names) means the generated signatures were incorrect when there is more than 1 argument. While sorting the methods and signals themselves (and properties, and annotations on all these) is fine, it's easiest to not sort anything.
This commit is contained in:
parent
06e1d72f54
commit
4c4acb6fbe
@ -700,7 +700,7 @@ class InterfaceInfoBodyCodeGenerator:
|
|||||||
def generate_array(self, array_name_lower, element_type, elements):
|
def generate_array(self, array_name_lower, element_type, elements):
|
||||||
self.outfile.write('const %s * const %s[] =\n' % (element_type, array_name_lower))
|
self.outfile.write('const %s * const %s[] =\n' % (element_type, array_name_lower))
|
||||||
self.outfile.write('{\n')
|
self.outfile.write('{\n')
|
||||||
for (_, name) in sorted(elements, key=utils.version_cmp_key):
|
for (_, name) in elements:
|
||||||
self.outfile.write(' &%s,\n' % name)
|
self.outfile.write(' &%s,\n' % name)
|
||||||
self.outfile.write(' NULL,\n')
|
self.outfile.write(' NULL,\n')
|
||||||
self.outfile.write('};\n')
|
self.outfile.write('};\n')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user