mapi/new: sort by slot number
authorEmil Velikov <emil.velikov@collabora.com>
Mon, 19 Nov 2018 14:19:03 +0000 (14:19 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 24 Jan 2019 18:13:25 +0000 (18:13 +0000)
Makes it easier to compare the newly generated header against the old
one. Will be reverted after the transition.

src/mapi/new/genCommon.py

index b0925d80151583d8dc516e04843c28ec00bfe800..ec48d522c05459e83ac1ffbf5ba4afc80f3cfb87 100644 (file)
@@ -74,6 +74,9 @@ def getFunctionsFromRoots(roots):
     for i in range(len(functions)):
         functions[i] = functions[i]._replace(slot=i)
 
+    # Sort the function list by slot.... to simplify the diff
+    functions = sorted(functions, key=lambda f: f.slot)
+
     return functions
 
 def getExportNamesFromRoots(target, roots):