From: Emil Velikov Date: Mon, 19 Nov 2018 14:19:03 +0000 (+0000) Subject: mapi/new: sort by slot number X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bba375c0160391225584b5a153c8d9febb8d2d9c;p=mesa.git mapi/new: sort by slot number Makes it easier to compare the newly generated header against the old one. Will be reverted after the transition. --- diff --git a/src/mapi/new/genCommon.py b/src/mapi/new/genCommon.py index b0925d80151..ec48d522c05 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):