[libxml2] Make gentest.py work with Python 2



commit 0fbfb4b587528c9a622901007cd693da08cd5a45
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Wed Aug 17 11:22:38 2022 +0200

    Make gentest.py work with Python 2

 gentest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gentest.py b/gentest.py
index 71da5dc8..172ed7e9 100755
--- a/gentest.py
+++ b/gentest.py
@@ -795,7 +795,7 @@ test_%s(void) {
         # assume that "size", "len", and "start" parameters apply to either
         # the nearest preceding or following char pointer
         if type == "int" and (nam == "size" or nam == "len" or nam == "start"):
-            for j in (*range(i - 1, -1, -1), *range(i + 1, len(t_args))):
+            for j in (list(range(i - 1, -1, -1)) + list(range(i + 1, len(t_args)))):
                 (bnam, btype) = t_args[j][:2]
                 if btype == "const_char_ptr" or btype == "const_xmlChar_ptr":
                     test.write(


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