[libxml2/2.10: 3/11] Fix order of exports in libxml2-api.xml
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2/2.10: 3/11] Fix order of exports in libxml2-api.xml
- Date: Thu, 25 Aug 2022 11:31:55 +0000 (UTC)
commit c4c816d08268b4444b629511942d2fdf629f063d
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Thu Aug 18 20:03:07 2022 +0200
Fix order of exports in libxml2-api.xml
The values passed to the `uniq` function are dictionary keys and should
already be unique. On older Python versions, this would reshuffle the
list after it had just been sorted.
doc/apibuild.py | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
---
diff --git a/doc/apibuild.py b/doc/apibuild.py
index fb0e733a..f46e1063 100755
--- a/doc/apibuild.py
+++ b/doc/apibuild.py
@@ -83,12 +83,6 @@ def escape(raw):
raw = raw.replace('"', '"')
return raw
-def uniq(items):
- d = {}
- for item in items:
- d[item]=1
- return list(d.keys())
-
class identifier:
def __init__(self, name, header=None, module=None, type=None, lineno = 0,
info=None, extra=None, conditionals = None):
@@ -1807,7 +1801,7 @@ class docBuilder:
ids = list(dict.macros.keys())
ids.sort()
- for id in uniq(ids):
+ for id in ids:
# Macros are sometime used to masquerade other types.
if id in dict.functions:
continue
@@ -1822,23 +1816,23 @@ class docBuilder:
output.write(" <exports symbol='%s' type='macro'/>\n" % (id))
ids = list(dict.enums.keys())
ids.sort()
- for id in uniq(ids):
+ for id in ids:
output.write(" <exports symbol='%s' type='enum'/>\n" % (id))
ids = list(dict.typedefs.keys())
ids.sort()
- for id in uniq(ids):
+ for id in ids:
output.write(" <exports symbol='%s' type='typedef'/>\n" % (id))
ids = list(dict.structs.keys())
ids.sort()
- for id in uniq(ids):
+ for id in ids:
output.write(" <exports symbol='%s' type='struct'/>\n" % (id))
ids = list(dict.variables.keys())
ids.sort()
- for id in uniq(ids):
+ for id in ids:
output.write(" <exports symbol='%s' type='variable'/>\n" % (id))
ids = list(dict.functions.keys())
ids.sort()
- for id in uniq(ids):
+ for id in ids:
output.write(" <exports symbol='%s' type='function'/>\n" % (id))
output.write(" </file>\n")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]