summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/btanks-sl08-python.patch
blob: 3e6eeefd613b694c2832ec4b02d9f11514e57fa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
Description: Convert sl08.py to Python 3
Author: Moritz Muehlenhoff <jmm@debian.org>
Bug-Debian: https://bugs.debian.org/936245

--- btanks-0.9.8083.orig/engine/sl08/sl08.py
+++ btanks-0.9.8083/engine/sl08/sl08.py
@@ -26,7 +26,7 @@ class Generator(object):
 		
 	def prototype(self, proto):	
 		r = '('
-		for i in xrange(0, self.__n): 
+		for i in range(0, self.__n): 
 			if proto: 
 				r = r + "arg%d_type " %(i + 1)
 			r = r + "a%d" %(i + 1)
@@ -41,14 +41,14 @@ class Generator(object):
 			r = '<typename return_type'
 		
 		if cname == 'base-signal': 
-			for i in xrange(0, self.__n): 
+			for i in range(0, self.__n): 
 				if not void or i > 0:
 					r = r + ", "
 				r = r + "typename arg%d_type" %(i + 1)
 			r = r + ">"
 			return r
 		elif cname == 'signal': 
-			for i in xrange(0, self.__n): 
+			for i in range(0, self.__n): 
 				if not void or i > 0:
 					r = r + ", "
 				r = r + "typename arg%d_type" %(i + 1)
@@ -61,7 +61,7 @@ class Generator(object):
 				r = r + "class validator_type = default_validator<return_type> >"
 			return r
 		elif cname == 'slot': 
-			for i in xrange(0, self.__n): 
+			for i in range(0, self.__n): 
 				if not void or i > 0:
 					r = r + ", "
 				r = r + "typename arg%d_type" %(i + 1)
@@ -70,7 +70,7 @@ class Generator(object):
 			r = r + "class object_type>"
 			return r
 		elif cname == 'base-slot': 
-			for i in xrange(0, self.__n): 
+			for i in range(0, self.__n): 
 				if not void or i > 0:
 					r = r + ", "
 				r = r + "typename arg%d_type" %(i + 1)
@@ -86,22 +86,22 @@ class Generator(object):
 			r = '<return_type'
 		
 		if cname == 'base-signal': 
-			for i in xrange(0, self.__n): 
+			for i in range(0, self.__n): 
 				r = r + ", arg%d_type" %(i + 1)
 			r = r + ">"
 			return r
 		elif cname == 'signal': 
-			for i in xrange(0, self.__n): 
+			for i in range(0, self.__n): 
 				r = r + ", arg%d_type" %(i + 1)
 			r = r + ", validator_type>"
 			return r
 		elif cname == 'slot': 
-			for i in xrange(0, self.__n): 
+			for i in range(0, self.__n): 
 				r = r + ", arg%d_type" %(i + 1)
 			r = r + ", object_type>"
 			return r
 		elif cname == 'base-slot': 
-			for i in xrange(0, self.__n): 
+			for i in range(0, self.__n): 
 				r = r + ", arg%d_type" %(i + 1)
 			r = r + ">"
 			return r
@@ -329,11 +329,11 @@ class Generator(object):
 		
 
 text = ''
-for i in xrange(0, 6):
+for i in range(0, 6):
 	g = Generator(i)
 	text = text + "\n" + g.generate(); 
 
-print """#ifndef BTANKS_SL08_SLOTSANDSIGNALS_H__
+print("""#ifndef BTANKS_SL08_SLOTSANDSIGNALS_H__
 #define BTANKS_SL08_SLOTSANDSIGNALS_H__
 
 /* sl08 - small slot/signals library
@@ -387,5 +387,5 @@ namespace sl08 {
 }
 
 #endif
-""" %(text);
+""" %(text));