]> git.pld-linux.org Git - packages/ice.git/blob - gcc11.patch
- fix building with gcc 11, rel 7
[packages/ice.git] / gcc11.patch
1 diff -ur ice-3.6.3/python/modules/IcePy/Operation.cpp ice-3.6.3-gcc11/python/modules/IcePy/Operation.cpp
2 --- ice-3.6.3/python/modules/IcePy/Operation.cpp        2016-10-05 16:59:08.000000000 +0200
3 +++ ice-3.6.3-gcc11/python/modules/IcePy/Operation.cpp  2021-10-17 22:55:04.065560566 +0200
4 @@ -1682,7 +1682,7 @@
5              }
6              else
7              {
8 -                if(PyTuple_SET_ITEM(results.get(), info->pos, Unset) < 0)
9 +                if(PyTuple_SET_ITEM(results.get(), info->pos, Unset) != 0)
10                  {
11                      return 0;
12                  }
13 @@ -2546,7 +2546,7 @@
14              throwPythonException();
15          }
16  
17 -        if(PyTuple_SET_ITEM(result.get(), 0, ok ? incTrue() : incFalse()) < 0)
18 +        if(PyTuple_SET_ITEM(result.get(), 0, ok ? incTrue() : incFalse()) != 0)
19          {
20              throwPythonException();
21          }
22 @@ -2586,7 +2586,7 @@
23          }
24  #endif
25  
26 -        if(PyTuple_SET_ITEM(result.get(), 1, op.get()) < 0)
27 +        if(PyTuple_SET_ITEM(result.get(), 1, op.get()) != 0)
28          {
29              throwPythonException();
30          }
31 @@ -2827,7 +2827,7 @@
32              return 0;
33          }
34  
35 -        if(PyTuple_SET_ITEM(args.get(), 0, ok ? incTrue() : incFalse()) < 0)
36 +        if(PyTuple_SET_ITEM(args.get(), 0, ok ? incTrue() : incFalse()) != 0)
37          {
38              return 0;
39          }
40 @@ -2867,7 +2867,7 @@
41          memcpy(buf, results.first, sz);
42  #endif
43  
44 -        if(PyTuple_SET_ITEM(args.get(), 1, op.get()) < 0)
45 +        if(PyTuple_SET_ITEM(args.get(), 1, op.get()) != 0)
46          {
47              return 0;
48          }
49 @@ -2910,7 +2910,7 @@
50              return;
51          }
52  
53 -        if(PyTuple_SET_ITEM(args.get(), 0, ok ? incTrue() : incFalse()) < 0)
54 +        if(PyTuple_SET_ITEM(args.get(), 0, ok ? incTrue() : incFalse()) != 0)
55          {
56              assert(PyErr_Occurred());
57              PyErr_Print();
58 @@ -2958,7 +2958,7 @@
59          memcpy(buf, results.first, sz);
60  #endif
61  
62 -        if(PyTuple_SET_ITEM(args.get(), 1, op.get()) < 0)
63 +        if(PyTuple_SET_ITEM(args.get(), 1, op.get()) != 0)
64          {
65              assert(PyErr_Occurred());
66              PyErr_Print();
67 @@ -3126,7 +3126,7 @@
68              return;
69          }
70  
71 -        if(PyTuple_SET_ITEM(args.get(), 0, ok ? incTrue() : incFalse()) < 0)
72 +        if(PyTuple_SET_ITEM(args.get(), 0, ok ? incTrue() : incFalse()) != 0)
73          {
74              assert(PyErr_Occurred());
75              PyErr_Print();
76 @@ -3174,7 +3174,7 @@
77          memcpy(buf, results.first, sz);
78  #endif
79  
80 -        if(PyTuple_SET_ITEM(args.get(), 1, op.get()) < 0)
81 +        if(PyTuple_SET_ITEM(args.get(), 1, op.get()) != 0)
82          {
83              assert(PyErr_Occurred());
84              PyErr_Print();
85 @@ -3302,7 +3302,7 @@
86                  }
87                  else
88                  {
89 -                    if(PyTuple_SET_ITEM(args.get(), info->pos + offset, Unset) < 0)
90 +                    if(PyTuple_SET_ITEM(args.get(), info->pos + offset, Unset) != 0)
91                      {
92                          throwPythonException();
93                      }
94 @@ -3329,7 +3329,7 @@
95      // Create an object to represent Ice::Current. We need to append this to the argument tuple.
96      //
97      PyObjectHandle curr = createCurrent(current);
98 -    if(PyTuple_SET_ITEM(args.get(), PyTuple_GET_SIZE(args.get()) - 1, curr.get()) < 0)
99 +    if(PyTuple_SET_ITEM(args.get(), PyTuple_GET_SIZE(args.get()) - 1, curr.get()) != 0)
100      {
101          throwPythonException();
102      }
103 @@ -3347,7 +3347,7 @@
104          }
105          obj->upcall = new UpcallPtr(this);
106          obj->encoding = current.encoding;
107 -        if(PyTuple_SET_ITEM(args.get(), 0, (PyObject*)obj) < 0) // PyTuple_SET_ITEM steals a reference.
108 +        if(PyTuple_SET_ITEM(args.get(), 0, (PyObject*)obj) != 0) // PyTuple_SET_ITEM steals a reference.
109          {
110              Py_DECREF(obj);
111              throwPythonException();
112 @@ -3698,7 +3698,7 @@
113      }
114  #endif
115  
116 -    if(PyTuple_SET_ITEM(args.get(), start, ip.get()) < 0)
117 +    if(PyTuple_SET_ITEM(args.get(), start, ip.get()) != 0)
118      {
119          throwPythonException();
120      }
121 @@ -3710,7 +3710,7 @@
122      // this to the argument tuple.
123      //
124      PyObjectHandle curr = createCurrent(current);
125 -    if(PyTuple_SET_ITEM(args.get(), start, curr.get()) < 0)
126 +    if(PyTuple_SET_ITEM(args.get(), start, curr.get()) != 0)
127      {
128          throwPythonException();
129      }
130 @@ -3730,7 +3730,7 @@
131          }
132          obj->upcall = new UpcallPtr(this);
133          obj->encoding = current.encoding;
134 -        if(PyTuple_SET_ITEM(args.get(), 0, (PyObject*)obj) < 0) // PyTuple_SET_ITEM steals a reference.
135 +        if(PyTuple_SET_ITEM(args.get(), 0, (PyObject*)obj) != 0) // PyTuple_SET_ITEM steals a reference.
136          {
137              Py_DECREF(obj);
138              throwPythonException();
This page took 0.065222 seconds and 3 git commands to generate.