[Mesa-dev] [PATCH 05/18] HACK: mapi/new: sort by slot number

Emil Velikov emil.l.velikov at gmail.com
Wed Nov 21 12:04:02 UTC 2018


From: Emil Velikov <emil.velikov at collabora.com>

Makes it easier to compare the newly generated header against the old
one.
---
 src/mapi/new/genCommon.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mapi/new/genCommon.py b/src/mapi/new/genCommon.py
index 5c721acbaca..ee3c468479d 100644
--- a/src/mapi/new/genCommon.py
+++ b/src/mapi/new/genCommon.py
@@ -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):
-- 
2.19.1



More information about the mesa-dev mailing list