Skip to content

Commit e8a03a2

Browse files
authored
Fix order by version in DDI tables
* Fix ABI compatibility issue by fixing order in DDI tables as per version. Signed-off-by: Brandon Yates <[email protected]>
1 parent a59d349 commit e8a03a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/templates/helper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ def get_class_function_objs(specs, cname, version = None, includeExt = False):
877877
else:
878878
objects.append(obj)
879879

880-
return sorted(objects, key=lambda obj: (float(obj.get('version',"1.0"))*10000) + int(obj.get('ordinal',"100")))
880+
return sorted(objects, key=lambda obj: (float(obj.get('version',"1.0").split(".")[0]) * 10000000) + (float(obj.get('version',"1.0").split(".")[1])*10000) + int(obj.get('ordinal',"100")))
881881

882882
"""
883883
Public:
@@ -895,8 +895,8 @@ def get_class_function_objs_exp(specs, cname):
895895
exp_objects.append(obj)
896896
else:
897897
objects.append(obj)
898-
objects = sorted(objects, key=lambda obj: (float(obj.get('version',"1.0"))*10000) + int(obj.get('ordinal',"100")))
899-
exp_objects = sorted(exp_objects, key=lambda obj: (float(obj.get('version',"1.0"))*10000) + int(obj.get('ordinal',"100")))
898+
objects = sorted(objects, key=lambda obj: (float(obj.get('version',"1.0").split(".")[0]) * 10000000) + (float(obj.get('version',"1.0").split(".")[1]) * 10000) + int(obj.get('ordinal',"100")))
899+
exp_objects = sorted(exp_objects, key=lambda obj: (float(obj.get('version',"1.0").split(".")[0]) * 10000000) + (float(obj.get('version',"1.0").split(".")[1])* 10000) + int(obj.get('ordinal',"100")))
900900
return objects, exp_objects
901901

902902
"""

0 commit comments

Comments
 (0)