[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [python PATCH 1/5] generator: enum: Don't sort enums by names



Setting OCDs aside, sorting enums breaks if the definition contains
links to other enums defined in the libvirt header before. Let the
generator generate it in the natural order.
---
 generator.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/generator.py b/generator.py
index a12c52b..9c497be 100755
--- a/generator.py
+++ b/generator.py
@@ -1786,8 +1786,6 @@ def buildWrappers(module):
         return value

     enumvals = list(enums.items())
-    if enumvals is not None:
-        enumvals.sort(key=lambda x: x[0])
     for type,enum in enumvals:
         classes.write("# %s\n" % type)
         items = list(enum.items())
-- 
2.0.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]