1 //     Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com
2 //
3 //     Part of "Nuitka", an optimizing Python compiler that is compatible and
4 //     integrates with CPython, but also works on its own.
5 //
6 //     Licensed under the Apache License, Version 2.0 (the "License");
7 //     you may not use this file except in compliance with the License.
8 //     You may obtain a copy of the License at
9 //
10 //        http://www.apache.org/licenses/LICENSE-2.0
11 //
12 //     Unless required by applicable law or agreed to in writing, software
13 //     distributed under the License is distributed on an "AS IS" BASIS,
14 //     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 //     See the License for the specific language governing permissions and
16 //     limitations under the License.
17 //
18 /* WARNING, this code is GENERATED. Modify the template HelperOperationBinary.c.j2 instead! */
19 
20 /* This file is included from another C file, help IDEs to still parse it on its own. */
21 #ifdef __IDE_ONLY__
22 #include "nuitka/prelude.h"
23 #endif
24 
25 /* C helpers for type specialized "*" (MULT) operations */
26 
27 #if PYTHON_VERSION < 0x300
28 /* Code referring to "INT" corresponds to Python2 'int' and "INT" to Python2 'int'. */
29 extern PyObject *BINARY_OPERATION_MULT_OBJECT_INT_INT(PyObject *operand1, PyObject *operand2);
30 #endif
31 
32 #if PYTHON_VERSION < 0x300
33 /* Code referring to "OBJECT" corresponds to any Python object and "INT" to Python2 'int'. */
34 extern PyObject *BINARY_OPERATION_MULT_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operand2);
35 #endif
36 
37 #if PYTHON_VERSION < 0x300
38 /* Code referring to "INT" corresponds to Python2 'int' and "OBJECT" to any Python object. */
39 extern PyObject *BINARY_OPERATION_MULT_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operand2);
40 #endif
41 
42 #if PYTHON_VERSION < 0x300
43 /* Code referring to "INT" corresponds to Python2 'int' and "INT" to Python2 'int'. */
44 extern nuitka_bool BINARY_OPERATION_MULT_NBOOL_INT_INT(PyObject *operand1, PyObject *operand2);
45 #endif
46 
47 #if PYTHON_VERSION < 0x300
48 /* Code referring to "OBJECT" corresponds to any Python object and "INT" to Python2 'int'. */
49 extern nuitka_bool BINARY_OPERATION_MULT_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *operand2);
50 #endif
51 
52 #if PYTHON_VERSION < 0x300
53 /* Code referring to "INT" corresponds to Python2 'int' and "OBJECT" to any Python object. */
54 extern nuitka_bool BINARY_OPERATION_MULT_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *operand2);
55 #endif
56 
57 /* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "LONG" to Python2 'long', Python3 'int'. */
58 extern PyObject *BINARY_OPERATION_MULT_OBJECT_LONG_LONG(PyObject *operand1, PyObject *operand2);
59 
60 /* Code referring to "OBJECT" corresponds to any Python object and "LONG" to Python2 'long', Python3 'int'. */
61 extern PyObject *BINARY_OPERATION_MULT_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *operand2);
62 
63 /* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "OBJECT" to any Python object. */
64 extern PyObject *BINARY_OPERATION_MULT_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *operand2);
65 
66 /* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "LONG" to Python2 'long', Python3 'int'. */
67 extern nuitka_bool BINARY_OPERATION_MULT_NBOOL_LONG_LONG(PyObject *operand1, PyObject *operand2);
68 
69 /* Code referring to "OBJECT" corresponds to any Python object and "LONG" to Python2 'long', Python3 'int'. */
70 extern nuitka_bool BINARY_OPERATION_MULT_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *operand2);
71 
72 /* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "OBJECT" to any Python object. */
73 extern nuitka_bool BINARY_OPERATION_MULT_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *operand2);
74 
75 /* Code referring to "FLOAT" corresponds to Python 'float' and "FLOAT" to Python 'float'. */
76 extern PyObject *BINARY_OPERATION_MULT_OBJECT_FLOAT_FLOAT(PyObject *operand1, PyObject *operand2);
77 
78 /* Code referring to "OBJECT" corresponds to any Python object and "FLOAT" to Python 'float'. */
79 extern PyObject *BINARY_OPERATION_MULT_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *operand2);
80 
81 /* Code referring to "FLOAT" corresponds to Python 'float' and "OBJECT" to any Python object. */
82 extern PyObject *BINARY_OPERATION_MULT_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *operand2);
83 
84 /* Code referring to "FLOAT" corresponds to Python 'float' and "FLOAT" to Python 'float'. */
85 extern nuitka_bool BINARY_OPERATION_MULT_NBOOL_FLOAT_FLOAT(PyObject *operand1, PyObject *operand2);
86 
87 /* Code referring to "OBJECT" corresponds to any Python object and "FLOAT" to Python 'float'. */
88 extern nuitka_bool BINARY_OPERATION_MULT_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *operand2);
89 
90 /* Code referring to "FLOAT" corresponds to Python 'float' and "OBJECT" to any Python object. */
91 extern nuitka_bool BINARY_OPERATION_MULT_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *operand2);
92 
93 /* Code referring to "CLONG" corresponds to C platform long value and "CLONG" to C platform long value. */
94 extern PyObject *BINARY_OPERATION_MULT_OBJECT_CLONG_CLONG(long operand1, long operand2);
95 
96 #if PYTHON_VERSION < 0x300
97 /* Code referring to "INT" corresponds to Python2 'int' and "CLONG" to C platform long value. */
98 extern PyObject *BINARY_OPERATION_MULT_OBJECT_INT_CLONG(PyObject *operand1, long operand2);
99 #endif
100 
101 #if PYTHON_VERSION < 0x300
102 /* Code referring to "CLONG" corresponds to C platform long value and "INT" to Python2 'int'. */
103 extern PyObject *BINARY_OPERATION_MULT_OBJECT_CLONG_INT(long operand1, PyObject *operand2);
104 #endif
105 
106 #if PYTHON_VERSION < 0x300
107 /* Code referring to "OBJECT" corresponds to any Python object and "STR" to Python2 'str'. */
108 extern PyObject *BINARY_OPERATION_MULT_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operand2);
109 #endif
110 
111 #if PYTHON_VERSION < 0x300
112 /* Code referring to "STR" corresponds to Python2 'str' and "OBJECT" to any Python object. */
113 extern PyObject *BINARY_OPERATION_MULT_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operand2);
114 #endif
115 
116 #if PYTHON_VERSION < 0x300
117 /* Code referring to "INT" corresponds to Python2 'int' and "STR" to Python2 'str'. */
118 extern PyObject *BINARY_OPERATION_MULT_OBJECT_INT_STR(PyObject *operand1, PyObject *operand2);
119 #endif
120 
121 #if PYTHON_VERSION < 0x300
122 /* Code referring to "STR" corresponds to Python2 'str' and "INT" to Python2 'int'. */
123 extern PyObject *BINARY_OPERATION_MULT_OBJECT_STR_INT(PyObject *operand1, PyObject *operand2);
124 #endif
125 
126 #if PYTHON_VERSION < 0x300
127 /* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "STR" to Python2 'str'. */
128 extern PyObject *BINARY_OPERATION_MULT_OBJECT_LONG_STR(PyObject *operand1, PyObject *operand2);
129 #endif
130 
131 #if PYTHON_VERSION < 0x300
132 /* Code referring to "STR" corresponds to Python2 'str' and "LONG" to Python2 'long', Python3 'int'. */
133 extern PyObject *BINARY_OPERATION_MULT_OBJECT_STR_LONG(PyObject *operand1, PyObject *operand2);
134 #endif
135 
136 /* Code referring to "OBJECT" corresponds to any Python object and "UNICODE" to Python2 'unicode', Python3 'str'. */
137 extern PyObject *BINARY_OPERATION_MULT_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *operand2);
138 
139 /* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "OBJECT" to any Python object. */
140 extern PyObject *BINARY_OPERATION_MULT_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *operand2);
141 
142 #if PYTHON_VERSION < 0x300
143 /* Code referring to "INT" corresponds to Python2 'int' and "UNICODE" to Python2 'unicode', Python3 'str'. */
144 extern PyObject *BINARY_OPERATION_MULT_OBJECT_INT_UNICODE(PyObject *operand1, PyObject *operand2);
145 #endif
146 
147 #if PYTHON_VERSION < 0x300
148 /* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "INT" to Python2 'int'. */
149 extern PyObject *BINARY_OPERATION_MULT_OBJECT_UNICODE_INT(PyObject *operand1, PyObject *operand2);
150 #endif
151 
152 /* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "UNICODE" to Python2 'unicode', Python3
153  * 'str'. */
154 extern PyObject *BINARY_OPERATION_MULT_OBJECT_LONG_UNICODE(PyObject *operand1, PyObject *operand2);
155 
156 /* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "LONG" to Python2 'long', Python3
157  * 'int'. */
158 extern PyObject *BINARY_OPERATION_MULT_OBJECT_UNICODE_LONG(PyObject *operand1, PyObject *operand2);
159 
160 /* Code referring to "OBJECT" corresponds to any Python object and "TUPLE" to Python 'tuple'. */
161 extern PyObject *BINARY_OPERATION_MULT_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *operand2);
162 
163 /* Code referring to "TUPLE" corresponds to Python 'tuple' and "OBJECT" to any Python object. */
164 extern PyObject *BINARY_OPERATION_MULT_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *operand2);
165 
166 #if PYTHON_VERSION < 0x300
167 /* Code referring to "INT" corresponds to Python2 'int' and "TUPLE" to Python 'tuple'. */
168 extern PyObject *BINARY_OPERATION_MULT_OBJECT_INT_TUPLE(PyObject *operand1, PyObject *operand2);
169 #endif
170 
171 #if PYTHON_VERSION < 0x300
172 /* Code referring to "TUPLE" corresponds to Python 'tuple' and "INT" to Python2 'int'. */
173 extern PyObject *BINARY_OPERATION_MULT_OBJECT_TUPLE_INT(PyObject *operand1, PyObject *operand2);
174 #endif
175 
176 /* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "TUPLE" to Python 'tuple'. */
177 extern PyObject *BINARY_OPERATION_MULT_OBJECT_LONG_TUPLE(PyObject *operand1, PyObject *operand2);
178 
179 /* Code referring to "TUPLE" corresponds to Python 'tuple' and "LONG" to Python2 'long', Python3 'int'. */
180 extern PyObject *BINARY_OPERATION_MULT_OBJECT_TUPLE_LONG(PyObject *operand1, PyObject *operand2);
181 
182 /* Code referring to "OBJECT" corresponds to any Python object and "LIST" to Python 'list'. */
183 extern PyObject *BINARY_OPERATION_MULT_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *operand2);
184 
185 /* Code referring to "LIST" corresponds to Python 'list' and "OBJECT" to any Python object. */
186 extern PyObject *BINARY_OPERATION_MULT_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *operand2);
187 
188 #if PYTHON_VERSION < 0x300
189 /* Code referring to "INT" corresponds to Python2 'int' and "LIST" to Python 'list'. */
190 extern PyObject *BINARY_OPERATION_MULT_OBJECT_INT_LIST(PyObject *operand1, PyObject *operand2);
191 #endif
192 
193 #if PYTHON_VERSION < 0x300
194 /* Code referring to "LIST" corresponds to Python 'list' and "INT" to Python2 'int'. */
195 extern PyObject *BINARY_OPERATION_MULT_OBJECT_LIST_INT(PyObject *operand1, PyObject *operand2);
196 #endif
197 
198 /* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "LIST" to Python 'list'. */
199 extern PyObject *BINARY_OPERATION_MULT_OBJECT_LONG_LIST(PyObject *operand1, PyObject *operand2);
200 
201 /* Code referring to "LIST" corresponds to Python 'list' and "LONG" to Python2 'long', Python3 'int'. */
202 extern PyObject *BINARY_OPERATION_MULT_OBJECT_LIST_LONG(PyObject *operand1, PyObject *operand2);
203 
204 #if PYTHON_VERSION >= 0x300
205 /* Code referring to "OBJECT" corresponds to any Python object and "BYTES" to Python3 'bytes'. */
206 extern PyObject *BINARY_OPERATION_MULT_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *operand2);
207 #endif
208 
209 #if PYTHON_VERSION >= 0x300
210 /* Code referring to "BYTES" corresponds to Python3 'bytes' and "OBJECT" to any Python object. */
211 extern PyObject *BINARY_OPERATION_MULT_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *operand2);
212 #endif
213 
214 #if PYTHON_VERSION >= 0x300
215 /* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "BYTES" to Python3 'bytes'. */
216 extern PyObject *BINARY_OPERATION_MULT_OBJECT_LONG_BYTES(PyObject *operand1, PyObject *operand2);
217 #endif
218 
219 #if PYTHON_VERSION >= 0x300
220 /* Code referring to "BYTES" corresponds to Python3 'bytes' and "LONG" to Python2 'long', Python3 'int'. */
221 extern PyObject *BINARY_OPERATION_MULT_OBJECT_BYTES_LONG(PyObject *operand1, PyObject *operand2);
222 #endif
223 
224 #if PYTHON_VERSION < 0x300
225 /* Code referring to "INT" corresponds to Python2 'int' and "LONG" to Python2 'long', Python3 'int'. */
226 extern PyObject *BINARY_OPERATION_MULT_OBJECT_INT_LONG(PyObject *operand1, PyObject *operand2);
227 #endif
228 
229 #if PYTHON_VERSION < 0x300
230 /* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "INT" to Python2 'int'. */
231 extern PyObject *BINARY_OPERATION_MULT_OBJECT_LONG_INT(PyObject *operand1, PyObject *operand2);
232 #endif
233 
234 #if PYTHON_VERSION < 0x300
235 /* Code referring to "INT" corresponds to Python2 'int' and "LONG" to Python2 'long', Python3 'int'. */
236 extern nuitka_bool BINARY_OPERATION_MULT_NBOOL_INT_LONG(PyObject *operand1, PyObject *operand2);
237 #endif
238 
239 #if PYTHON_VERSION < 0x300
240 /* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "INT" to Python2 'int'. */
241 extern nuitka_bool BINARY_OPERATION_MULT_NBOOL_LONG_INT(PyObject *operand1, PyObject *operand2);
242 #endif
243 
244 #if PYTHON_VERSION < 0x300
245 /* Code referring to "INT" corresponds to Python2 'int' and "FLOAT" to Python 'float'. */
246 extern PyObject *BINARY_OPERATION_MULT_OBJECT_INT_FLOAT(PyObject *operand1, PyObject *operand2);
247 #endif
248 
249 #if PYTHON_VERSION < 0x300
250 /* Code referring to "FLOAT" corresponds to Python 'float' and "INT" to Python2 'int'. */
251 extern PyObject *BINARY_OPERATION_MULT_OBJECT_FLOAT_INT(PyObject *operand1, PyObject *operand2);
252 #endif
253 
254 #if PYTHON_VERSION < 0x300
255 /* Code referring to "INT" corresponds to Python2 'int' and "FLOAT" to Python 'float'. */
256 extern nuitka_bool BINARY_OPERATION_MULT_NBOOL_INT_FLOAT(PyObject *operand1, PyObject *operand2);
257 #endif
258 
259 #if PYTHON_VERSION < 0x300
260 /* Code referring to "FLOAT" corresponds to Python 'float' and "INT" to Python2 'int'. */
261 extern nuitka_bool BINARY_OPERATION_MULT_NBOOL_FLOAT_INT(PyObject *operand1, PyObject *operand2);
262 #endif
263 
264 /* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "FLOAT" to Python 'float'. */
265 extern PyObject *BINARY_OPERATION_MULT_OBJECT_LONG_FLOAT(PyObject *operand1, PyObject *operand2);
266 
267 /* Code referring to "FLOAT" corresponds to Python 'float' and "LONG" to Python2 'long', Python3 'int'. */
268 extern PyObject *BINARY_OPERATION_MULT_OBJECT_FLOAT_LONG(PyObject *operand1, PyObject *operand2);
269 
270 /* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "FLOAT" to Python 'float'. */
271 extern nuitka_bool BINARY_OPERATION_MULT_NBOOL_LONG_FLOAT(PyObject *operand1, PyObject *operand2);
272 
273 /* Code referring to "FLOAT" corresponds to Python 'float' and "LONG" to Python2 'long', Python3 'int'. */
274 extern nuitka_bool BINARY_OPERATION_MULT_NBOOL_FLOAT_LONG(PyObject *operand1, PyObject *operand2);
275 
276 /* Code referring to "OBJECT" corresponds to any Python object and "OBJECT" to any Python object. */
277 extern PyObject *BINARY_OPERATION_MULT_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *operand2);
278 
279 /* Code referring to "OBJECT" corresponds to any Python object and "OBJECT" to any Python object. */
280 extern nuitka_bool BINARY_OPERATION_MULT_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *operand2);
281