diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2022-08-18 20:03:07 +0200 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2022-08-18 21:31:36 +0200 |
commit | a7af2c99e30ed9366d5ca6252ec277d5b3d79e56 (patch) | |
tree | d0ceabc0c1863b4e494adb0a99af03a95e95cfea /doc | |
parent | f82b56c6c9a5dc518124a131480f2ad314f1c865 (diff) | |
download | libxml2-a7af2c99e30ed9366d5ca6252ec277d5b3d79e56.tar.gz |
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.
Diffstat (limited to 'doc')
-rwxr-xr-x | doc/apibuild.py | 18 |
1 files 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") |