Nuitka
The Python compiler
Loading...
Searching...
No Matches
operations_binary_mod.h
1// Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
2
3/* WARNING, this code is GENERATED. Modify the template HelperOperationBinary.c.j2 instead! */
4
5/* This file is included from another C file, help IDEs to still parse it on its own. */
6#ifdef __IDE_ONLY__
7#include "nuitka/prelude.h"
8#endif
9
10/* C helpers for type specialized "%" (MOD) operations */
11
12#if PYTHON_VERSION < 0x300
13/* Code referring to "INT" corresponds to Python2 'int' and "INT" to Python2 'int'. */
14extern PyObject *BINARY_OPERATION_MOD_OBJECT_INT_INT(PyObject *operand1, PyObject *operand2);
15#endif
16
17#if PYTHON_VERSION < 0x300
18/* Code referring to "OBJECT" corresponds to any Python object and "INT" to Python2 'int'. */
19extern PyObject *BINARY_OPERATION_MOD_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operand2);
20#endif
21
22#if PYTHON_VERSION < 0x300
23/* Code referring to "INT" corresponds to Python2 'int' and "OBJECT" to any Python object. */
24extern PyObject *BINARY_OPERATION_MOD_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operand2);
25#endif
26
27#if PYTHON_VERSION < 0x300
28/* Code referring to "INT" corresponds to Python2 'int' and "INT" to Python2 'int'. */
29extern nuitka_bool BINARY_OPERATION_MOD_NBOOL_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'. */
34extern nuitka_bool BINARY_OPERATION_MOD_NBOOL_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. */
39extern nuitka_bool BINARY_OPERATION_MOD_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *operand2);
40#endif
41
42/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "LONG" to Python2 'long', Python3 'int'. */
43extern PyObject *BINARY_OPERATION_MOD_OBJECT_LONG_LONG(PyObject *operand1, PyObject *operand2);
44
45/* Code referring to "OBJECT" corresponds to any Python object and "LONG" to Python2 'long', Python3 'int'. */
46extern PyObject *BINARY_OPERATION_MOD_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *operand2);
47
48/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "OBJECT" to any Python object. */
49extern PyObject *BINARY_OPERATION_MOD_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *operand2);
50
51/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "LONG" to Python2 'long', Python3 'int'. */
52extern nuitka_bool BINARY_OPERATION_MOD_NBOOL_LONG_LONG(PyObject *operand1, PyObject *operand2);
53
54/* Code referring to "OBJECT" corresponds to any Python object and "LONG" to Python2 'long', Python3 'int'. */
55extern nuitka_bool BINARY_OPERATION_MOD_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *operand2);
56
57/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "OBJECT" to any Python object. */
58extern nuitka_bool BINARY_OPERATION_MOD_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *operand2);
59
60/* Code referring to "FLOAT" corresponds to Python 'float' and "FLOAT" to Python 'float'. */
61extern PyObject *BINARY_OPERATION_MOD_OBJECT_FLOAT_FLOAT(PyObject *operand1, PyObject *operand2);
62
63/* Code referring to "OBJECT" corresponds to any Python object and "FLOAT" to Python 'float'. */
64extern PyObject *BINARY_OPERATION_MOD_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *operand2);
65
66/* Code referring to "FLOAT" corresponds to Python 'float' and "OBJECT" to any Python object. */
67extern PyObject *BINARY_OPERATION_MOD_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *operand2);
68
69/* Code referring to "FLOAT" corresponds to Python 'float' and "FLOAT" to Python 'float'. */
70extern nuitka_bool BINARY_OPERATION_MOD_NBOOL_FLOAT_FLOAT(PyObject *operand1, PyObject *operand2);
71
72/* Code referring to "OBJECT" corresponds to any Python object and "FLOAT" to Python 'float'. */
73extern nuitka_bool BINARY_OPERATION_MOD_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *operand2);
74
75/* Code referring to "FLOAT" corresponds to Python 'float' and "OBJECT" to any Python object. */
76extern nuitka_bool BINARY_OPERATION_MOD_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *operand2);
77
78/* Code referring to "FLOAT" corresponds to Python 'float' and "LONG" to Python2 'long', Python3 'int'. */
79extern PyObject *BINARY_OPERATION_MOD_OBJECT_FLOAT_LONG(PyObject *operand1, PyObject *operand2);
80
81/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "FLOAT" to Python 'float'. */
82extern PyObject *BINARY_OPERATION_MOD_OBJECT_LONG_FLOAT(PyObject *operand1, PyObject *operand2);
83
84/* Code referring to "FLOAT" corresponds to Python 'float' and "LONG" to Python2 'long', Python3 'int'. */
85extern nuitka_bool BINARY_OPERATION_MOD_NBOOL_FLOAT_LONG(PyObject *operand1, PyObject *operand2);
86
87/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "FLOAT" to Python 'float'. */
88extern nuitka_bool BINARY_OPERATION_MOD_NBOOL_LONG_FLOAT(PyObject *operand1, PyObject *operand2);
89
90#if PYTHON_VERSION < 0x300
91/* Code referring to "FLOAT" corresponds to Python 'float' and "INT" to Python2 'int'. */
92extern PyObject *BINARY_OPERATION_MOD_OBJECT_FLOAT_INT(PyObject *operand1, PyObject *operand2);
93#endif
94
95#if PYTHON_VERSION < 0x300
96/* Code referring to "INT" corresponds to Python2 'int' and "FLOAT" to Python 'float'. */
97extern PyObject *BINARY_OPERATION_MOD_OBJECT_INT_FLOAT(PyObject *operand1, PyObject *operand2);
98#endif
99
100#if PYTHON_VERSION < 0x300
101/* Code referring to "FLOAT" corresponds to Python 'float' and "INT" to Python2 'int'. */
102extern nuitka_bool BINARY_OPERATION_MOD_NBOOL_FLOAT_INT(PyObject *operand1, PyObject *operand2);
103#endif
104
105#if PYTHON_VERSION < 0x300
106/* Code referring to "INT" corresponds to Python2 'int' and "FLOAT" to Python 'float'. */
107extern nuitka_bool BINARY_OPERATION_MOD_NBOOL_INT_FLOAT(PyObject *operand1, PyObject *operand2);
108#endif
109
110#if PYTHON_VERSION < 0x300
111/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "INT" to Python2 'int'. */
112extern PyObject *BINARY_OPERATION_MOD_OBJECT_LONG_INT(PyObject *operand1, PyObject *operand2);
113#endif
114
115#if PYTHON_VERSION < 0x300
116/* Code referring to "INT" corresponds to Python2 'int' and "LONG" to Python2 'long', Python3 'int'. */
117extern PyObject *BINARY_OPERATION_MOD_OBJECT_INT_LONG(PyObject *operand1, PyObject *operand2);
118#endif
119
120#if PYTHON_VERSION < 0x300
121/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "INT" to Python2 'int'. */
122extern nuitka_bool BINARY_OPERATION_MOD_NBOOL_LONG_INT(PyObject *operand1, PyObject *operand2);
123#endif
124
125#if PYTHON_VERSION < 0x300
126/* Code referring to "INT" corresponds to Python2 'int' and "LONG" to Python2 'long', Python3 'int'. */
127extern nuitka_bool BINARY_OPERATION_MOD_NBOOL_INT_LONG(PyObject *operand1, PyObject *operand2);
128#endif
129
130#if PYTHON_VERSION < 0x300
131/* Code referring to "INT" corresponds to Python2 'int' and "CLONG" to C platform long value. */
132extern PyObject *BINARY_OPERATION_MOD_OBJECT_INT_CLONG(PyObject *operand1, long operand2);
133#endif
134
135#if PYTHON_VERSION < 0x300
136/* Code referring to "CLONG" corresponds to C platform long value and "INT" to Python2 'int'. */
137extern PyObject *BINARY_OPERATION_MOD_OBJECT_CLONG_INT(long operand1, PyObject *operand2);
138#endif
139
140#if PYTHON_VERSION < 0x300
141/* Code referring to "INT" corresponds to Python2 'int' and "CLONG" to C platform long value. */
142extern nuitka_bool BINARY_OPERATION_MOD_NBOOL_INT_CLONG(PyObject *operand1, long operand2);
143#endif
144
145#if PYTHON_VERSION < 0x300
146/* Code referring to "CLONG" corresponds to C platform long value and "INT" to Python2 'int'. */
147extern nuitka_bool BINARY_OPERATION_MOD_NBOOL_CLONG_INT(long operand1, PyObject *operand2);
148#endif
149
150/* Code referring to "FLOAT" corresponds to Python 'float' and "CFLOAT" to C platform float value. */
151extern PyObject *BINARY_OPERATION_MOD_OBJECT_FLOAT_CFLOAT(PyObject *operand1, double operand2);
152
153/* Code referring to "CFLOAT" corresponds to C platform float value and "FLOAT" to Python 'float'. */
154extern PyObject *BINARY_OPERATION_MOD_OBJECT_CFLOAT_FLOAT(double operand1, PyObject *operand2);
155
156/* Code referring to "FLOAT" corresponds to Python 'float' and "CFLOAT" to C platform float value. */
157extern nuitka_bool BINARY_OPERATION_MOD_NBOOL_FLOAT_CFLOAT(PyObject *operand1, double operand2);
158
159/* Code referring to "CFLOAT" corresponds to C platform float value and "FLOAT" to Python 'float'. */
160extern nuitka_bool BINARY_OPERATION_MOD_NBOOL_CFLOAT_FLOAT(double operand1, PyObject *operand2);
161
162#if PYTHON_VERSION < 0x300
163/* Code referring to "STR" corresponds to Python2 'str' and "INT" to Python2 'int'. */
164extern PyObject *BINARY_OPERATION_MOD_OBJECT_STR_INT(PyObject *operand1, PyObject *operand2);
165#endif
166
167#if PYTHON_VERSION < 0x300
168/* Code referring to "STR" corresponds to Python2 'str' and "LONG" to Python2 'long', Python3 'int'. */
169extern PyObject *BINARY_OPERATION_MOD_OBJECT_STR_LONG(PyObject *operand1, PyObject *operand2);
170#endif
171
172#if PYTHON_VERSION < 0x300
173/* Code referring to "STR" corresponds to Python2 'str' and "FLOAT" to Python 'float'. */
174extern PyObject *BINARY_OPERATION_MOD_OBJECT_STR_FLOAT(PyObject *operand1, PyObject *operand2);
175#endif
176
177#if PYTHON_VERSION < 0x300
178/* Code referring to "STR" corresponds to Python2 'str' and "STR" to Python2 'str'. */
179extern PyObject *BINARY_OPERATION_MOD_OBJECT_STR_STR(PyObject *operand1, PyObject *operand2);
180#endif
181
182#if PYTHON_VERSION < 0x300
183/* Code referring to "STR" corresponds to Python2 'str' and "UNICODE" to Python2 'unicode', Python3 'str'. */
184extern PyObject *BINARY_OPERATION_MOD_OBJECT_STR_UNICODE(PyObject *operand1, PyObject *operand2);
185#endif
186
187#if PYTHON_VERSION < 0x300
188/* Code referring to "STR" corresponds to Python2 'str' and "TUPLE" to Python 'tuple'. */
189extern PyObject *BINARY_OPERATION_MOD_OBJECT_STR_TUPLE(PyObject *operand1, PyObject *operand2);
190#endif
191
192#if PYTHON_VERSION < 0x300
193/* Code referring to "STR" corresponds to Python2 'str' and "LIST" to Python 'list'. */
194extern PyObject *BINARY_OPERATION_MOD_OBJECT_STR_LIST(PyObject *operand1, PyObject *operand2);
195#endif
196
197#if PYTHON_VERSION < 0x300
198/* Code referring to "STR" corresponds to Python2 'str' and "DICT" to Python 'dict'. */
199extern PyObject *BINARY_OPERATION_MOD_OBJECT_STR_DICT(PyObject *operand1, PyObject *operand2);
200#endif
201
202#if PYTHON_VERSION < 0x300
203/* Code referring to "STR" corresponds to Python2 'str' and "OBJECT" to any Python object. */
204extern PyObject *BINARY_OPERATION_MOD_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operand2);
205#endif
206
207#if PYTHON_VERSION < 0x300
208/* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "INT" to Python2 'int'. */
209extern PyObject *BINARY_OPERATION_MOD_OBJECT_UNICODE_INT(PyObject *operand1, PyObject *operand2);
210#endif
211
212/* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "LONG" to Python2 'long', Python3
213 * 'int'. */
214extern PyObject *BINARY_OPERATION_MOD_OBJECT_UNICODE_LONG(PyObject *operand1, PyObject *operand2);
215
216/* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "FLOAT" to Python 'float'. */
217extern PyObject *BINARY_OPERATION_MOD_OBJECT_UNICODE_FLOAT(PyObject *operand1, PyObject *operand2);
218
219#if PYTHON_VERSION < 0x300
220/* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "STR" to Python2 'str'. */
221extern PyObject *BINARY_OPERATION_MOD_OBJECT_UNICODE_STR(PyObject *operand1, PyObject *operand2);
222#endif
223
224#if PYTHON_VERSION >= 0x300
225/* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "BYTES" to Python3 'bytes'. */
226extern PyObject *BINARY_OPERATION_MOD_OBJECT_UNICODE_BYTES(PyObject *operand1, PyObject *operand2);
227#endif
228
229/* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "UNICODE" to Python2 'unicode',
230 * Python3 'str'. */
231extern PyObject *BINARY_OPERATION_MOD_OBJECT_UNICODE_UNICODE(PyObject *operand1, PyObject *operand2);
232
233/* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "TUPLE" to Python 'tuple'. */
234extern PyObject *BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(PyObject *operand1, PyObject *operand2);
235
236/* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "LIST" to Python 'list'. */
237extern PyObject *BINARY_OPERATION_MOD_OBJECT_UNICODE_LIST(PyObject *operand1, PyObject *operand2);
238
239/* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "DICT" to Python 'dict'. */
240extern PyObject *BINARY_OPERATION_MOD_OBJECT_UNICODE_DICT(PyObject *operand1, PyObject *operand2);
241
242/* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "OBJECT" to any Python object. */
243extern PyObject *BINARY_OPERATION_MOD_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *operand2);
244
245#if PYTHON_VERSION >= 0x300
246/* Code referring to "BYTES" corresponds to Python3 'bytes' and "LONG" to Python2 'long', Python3 'int'. */
247extern PyObject *BINARY_OPERATION_MOD_OBJECT_BYTES_LONG(PyObject *operand1, PyObject *operand2);
248#endif
249
250#if PYTHON_VERSION >= 0x300
251/* Code referring to "BYTES" corresponds to Python3 'bytes' and "FLOAT" to Python 'float'. */
252extern PyObject *BINARY_OPERATION_MOD_OBJECT_BYTES_FLOAT(PyObject *operand1, PyObject *operand2);
253#endif
254
255#if PYTHON_VERSION >= 0x300
256/* Code referring to "BYTES" corresponds to Python3 'bytes' and "BYTES" to Python3 'bytes'. */
257extern PyObject *BINARY_OPERATION_MOD_OBJECT_BYTES_BYTES(PyObject *operand1, PyObject *operand2);
258#endif
259
260#if PYTHON_VERSION >= 0x300
261/* Code referring to "BYTES" corresponds to Python3 'bytes' and "UNICODE" to Python2 'unicode', Python3 'str'. */
262extern PyObject *BINARY_OPERATION_MOD_OBJECT_BYTES_UNICODE(PyObject *operand1, PyObject *operand2);
263#endif
264
265#if PYTHON_VERSION >= 0x300
266/* Code referring to "BYTES" corresponds to Python3 'bytes' and "TUPLE" to Python 'tuple'. */
267extern PyObject *BINARY_OPERATION_MOD_OBJECT_BYTES_TUPLE(PyObject *operand1, PyObject *operand2);
268#endif
269
270#if PYTHON_VERSION >= 0x300
271/* Code referring to "BYTES" corresponds to Python3 'bytes' and "LIST" to Python 'list'. */
272extern PyObject *BINARY_OPERATION_MOD_OBJECT_BYTES_LIST(PyObject *operand1, PyObject *operand2);
273#endif
274
275#if PYTHON_VERSION >= 0x300
276/* Code referring to "BYTES" corresponds to Python3 'bytes' and "DICT" to Python 'dict'. */
277extern PyObject *BINARY_OPERATION_MOD_OBJECT_BYTES_DICT(PyObject *operand1, PyObject *operand2);
278#endif
279
280#if PYTHON_VERSION >= 0x300
281/* Code referring to "BYTES" corresponds to Python3 'bytes' and "OBJECT" to any Python object. */
282extern PyObject *BINARY_OPERATION_MOD_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *operand2);
283#endif
284
285/* Code referring to "OBJECT" corresponds to any Python object and "OBJECT" to any Python object. */
286extern PyObject *BINARY_OPERATION_MOD_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *operand2);
287
288/* Code referring to "OBJECT" corresponds to any Python object and "OBJECT" to any Python object. */
289extern nuitka_bool BINARY_OPERATION_MOD_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *operand2);
290
291// Part of "Nuitka", an optimizing Python compiler that is compatible and
292// integrates with CPython, but also works on its own.
293//
294// Licensed under the Apache License, Version 2.0 (the "License");
295// you may not use this file except in compliance with the License.
296// You may obtain a copy of the License at
297//
298// http://www.apache.org/licenses/LICENSE-2.0
299//
300// Unless required by applicable law or agreed to in writing, software
301// distributed under the License is distributed on an "AS IS" BASIS,
302// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
303// See the License for the specific language governing permissions and
304// limitations under the License.