[glib/wip/kalev/recursive-mutex-locker: 3/7] gdbus-codegen: don't sort args in --interface-info-body
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/kalev/recursive-mutex-locker: 3/7] gdbus-codegen: don't sort args in --interface-info-body
- Date: Fri, 14 Dec 2018 18:21:17 +0000 (UTC)
commit 7295c27fa162f155d2d46e850378fe073ba99de5
Author: Will Thompson <will willthompson co uk>
Date: Thu Dec 6 17:28:09 2018 +0000
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.
gio/gdbus-2.0/codegen/codegen.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gio/gdbus-2.0/codegen/codegen.py b/gio/gdbus-2.0/codegen/codegen.py
index 9220176a8..daf55bfbe 100644
--- a/gio/gdbus-2.0/codegen/codegen.py
+++ b/gio/gdbus-2.0/codegen/codegen.py
@@ -700,7 +700,7 @@ class InterfaceInfoBodyCodeGenerator:
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('{\n')
- for (_, name) in sorted(elements, key=utils.version_cmp_key):
+ for (_, name) in elements:
self.outfile.write(' &%s,\n' % name)
self.outfile.write(' NULL,\n')
self.outfile.write('};\n')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]