Nuitka
The Python compiler
Loading...
Searching...
No Matches
operations_inplace_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 HelperOperationInplace.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 in-place "%" (MOD) operations */
11
12#if PYTHON_VERSION < 0x300
13/* Code referring to "INT" corresponds to Python2 'int' and "INT" to Python2 'int'. */
14extern bool INPLACE_OPERATION_MOD_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 bool INPLACE_OPERATION_MOD_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 bool INPLACE_OPERATION_MOD_INT_OBJECT(PyObject **operand1, PyObject *operand2);
25#endif
26
27/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "LONG" to Python2 'long', Python3 'int'. */
28extern bool INPLACE_OPERATION_MOD_LONG_LONG(PyObject **operand1, PyObject *operand2);
29
30/* Code referring to "OBJECT" corresponds to any Python object and "LONG" to Python2 'long', Python3 'int'. */
31extern bool INPLACE_OPERATION_MOD_OBJECT_LONG(PyObject **operand1, PyObject *operand2);
32
33/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "OBJECT" to any Python object. */
34extern bool INPLACE_OPERATION_MOD_LONG_OBJECT(PyObject **operand1, PyObject *operand2);
35
36/* Code referring to "FLOAT" corresponds to Python 'float' and "FLOAT" to Python 'float'. */
37extern bool INPLACE_OPERATION_MOD_FLOAT_FLOAT(PyObject **operand1, PyObject *operand2);
38
39/* Code referring to "OBJECT" corresponds to any Python object and "FLOAT" to Python 'float'. */
40extern bool INPLACE_OPERATION_MOD_OBJECT_FLOAT(PyObject **operand1, PyObject *operand2);
41
42/* Code referring to "FLOAT" corresponds to Python 'float' and "OBJECT" to any Python object. */
43extern bool INPLACE_OPERATION_MOD_FLOAT_OBJECT(PyObject **operand1, PyObject *operand2);
44
45/* Code referring to "FLOAT" corresponds to Python 'float' and "LONG" to Python2 'long', Python3 'int'. */
46extern bool INPLACE_OPERATION_MOD_FLOAT_LONG(PyObject **operand1, PyObject *operand2);
47
48/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "FLOAT" to Python 'float'. */
49extern bool INPLACE_OPERATION_MOD_LONG_FLOAT(PyObject **operand1, PyObject *operand2);
50
51#if PYTHON_VERSION < 0x300
52/* Code referring to "FLOAT" corresponds to Python 'float' and "INT" to Python2 'int'. */
53extern bool INPLACE_OPERATION_MOD_FLOAT_INT(PyObject **operand1, PyObject *operand2);
54#endif
55
56#if PYTHON_VERSION < 0x300
57/* Code referring to "INT" corresponds to Python2 'int' and "FLOAT" to Python 'float'. */
58extern bool INPLACE_OPERATION_MOD_INT_FLOAT(PyObject **operand1, PyObject *operand2);
59#endif
60
61#if PYTHON_VERSION < 0x300
62/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "INT" to Python2 'int'. */
63extern bool INPLACE_OPERATION_MOD_LONG_INT(PyObject **operand1, PyObject *operand2);
64#endif
65
66#if PYTHON_VERSION < 0x300
67/* Code referring to "INT" corresponds to Python2 'int' and "LONG" to Python2 'long', Python3 'int'. */
68extern bool INPLACE_OPERATION_MOD_INT_LONG(PyObject **operand1, PyObject *operand2);
69#endif
70
71#if PYTHON_VERSION < 0x300
72/* Code referring to "INT" corresponds to Python2 'int' and "CLONG" to C platform long value. */
73extern bool INPLACE_OPERATION_MOD_INT_CLONG(PyObject **operand1, long operand2);
74#endif
75
76/* Code referring to "FLOAT" corresponds to Python 'float' and "CFLOAT" to C platform float value. */
77extern bool INPLACE_OPERATION_MOD_FLOAT_CFLOAT(PyObject **operand1, double operand2);
78
79#if PYTHON_VERSION < 0x300
80/* Code referring to "STR" corresponds to Python2 'str' and "INT" to Python2 'int'. */
81extern bool INPLACE_OPERATION_MOD_STR_INT(PyObject **operand1, PyObject *operand2);
82#endif
83
84#if PYTHON_VERSION < 0x300
85/* Code referring to "STR" corresponds to Python2 'str' and "LONG" to Python2 'long', Python3 'int'. */
86extern bool INPLACE_OPERATION_MOD_STR_LONG(PyObject **operand1, PyObject *operand2);
87#endif
88
89#if PYTHON_VERSION < 0x300
90/* Code referring to "STR" corresponds to Python2 'str' and "FLOAT" to Python 'float'. */
91extern bool INPLACE_OPERATION_MOD_STR_FLOAT(PyObject **operand1, PyObject *operand2);
92#endif
93
94#if PYTHON_VERSION < 0x300
95/* Code referring to "STR" corresponds to Python2 'str' and "STR" to Python2 'str'. */
96extern bool INPLACE_OPERATION_MOD_STR_STR(PyObject **operand1, PyObject *operand2);
97#endif
98
99#if PYTHON_VERSION < 0x300
100/* Code referring to "STR" corresponds to Python2 'str' and "UNICODE" to Python2 'unicode', Python3 'str'. */
101extern bool INPLACE_OPERATION_MOD_STR_UNICODE(PyObject **operand1, PyObject *operand2);
102#endif
103
104#if PYTHON_VERSION < 0x300
105/* Code referring to "STR" corresponds to Python2 'str' and "TUPLE" to Python 'tuple'. */
106extern bool INPLACE_OPERATION_MOD_STR_TUPLE(PyObject **operand1, PyObject *operand2);
107#endif
108
109#if PYTHON_VERSION < 0x300
110/* Code referring to "STR" corresponds to Python2 'str' and "LIST" to Python 'list'. */
111extern bool INPLACE_OPERATION_MOD_STR_LIST(PyObject **operand1, PyObject *operand2);
112#endif
113
114#if PYTHON_VERSION < 0x300
115/* Code referring to "STR" corresponds to Python2 'str' and "DICT" to Python 'dict'. */
116extern bool INPLACE_OPERATION_MOD_STR_DICT(PyObject **operand1, PyObject *operand2);
117#endif
118
119#if PYTHON_VERSION < 0x300
120/* Code referring to "STR" corresponds to Python2 'str' and "OBJECT" to any Python object. */
121extern bool INPLACE_OPERATION_MOD_STR_OBJECT(PyObject **operand1, PyObject *operand2);
122#endif
123
124#if PYTHON_VERSION < 0x300
125/* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "INT" to Python2 'int'. */
126extern bool INPLACE_OPERATION_MOD_UNICODE_INT(PyObject **operand1, PyObject *operand2);
127#endif
128
129/* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "LONG" to Python2 'long', Python3
130 * 'int'. */
131extern bool INPLACE_OPERATION_MOD_UNICODE_LONG(PyObject **operand1, PyObject *operand2);
132
133/* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "FLOAT" to Python 'float'. */
134extern bool INPLACE_OPERATION_MOD_UNICODE_FLOAT(PyObject **operand1, PyObject *operand2);
135
136#if PYTHON_VERSION < 0x300
137/* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "STR" to Python2 'str'. */
138extern bool INPLACE_OPERATION_MOD_UNICODE_STR(PyObject **operand1, PyObject *operand2);
139#endif
140
141#if PYTHON_VERSION >= 0x300
142/* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "BYTES" to Python3 'bytes'. */
143extern bool INPLACE_OPERATION_MOD_UNICODE_BYTES(PyObject **operand1, PyObject *operand2);
144#endif
145
146/* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "UNICODE" to Python2 'unicode',
147 * Python3 'str'. */
148extern bool INPLACE_OPERATION_MOD_UNICODE_UNICODE(PyObject **operand1, PyObject *operand2);
149
150/* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "TUPLE" to Python 'tuple'. */
151extern bool INPLACE_OPERATION_MOD_UNICODE_TUPLE(PyObject **operand1, PyObject *operand2);
152
153/* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "LIST" to Python 'list'. */
154extern bool INPLACE_OPERATION_MOD_UNICODE_LIST(PyObject **operand1, PyObject *operand2);
155
156/* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "DICT" to Python 'dict'. */
157extern bool INPLACE_OPERATION_MOD_UNICODE_DICT(PyObject **operand1, PyObject *operand2);
158
159/* Code referring to "UNICODE" corresponds to Python2 'unicode', Python3 'str' and "OBJECT" to any Python object. */
160extern bool INPLACE_OPERATION_MOD_UNICODE_OBJECT(PyObject **operand1, PyObject *operand2);
161
162#if PYTHON_VERSION >= 0x300
163/* Code referring to "BYTES" corresponds to Python3 'bytes' and "LONG" to Python2 'long', Python3 'int'. */
164extern bool INPLACE_OPERATION_MOD_BYTES_LONG(PyObject **operand1, PyObject *operand2);
165#endif
166
167#if PYTHON_VERSION >= 0x300
168/* Code referring to "BYTES" corresponds to Python3 'bytes' and "FLOAT" to Python 'float'. */
169extern bool INPLACE_OPERATION_MOD_BYTES_FLOAT(PyObject **operand1, PyObject *operand2);
170#endif
171
172#if PYTHON_VERSION >= 0x300
173/* Code referring to "BYTES" corresponds to Python3 'bytes' and "BYTES" to Python3 'bytes'. */
174extern bool INPLACE_OPERATION_MOD_BYTES_BYTES(PyObject **operand1, PyObject *operand2);
175#endif
176
177#if PYTHON_VERSION >= 0x300
178/* Code referring to "BYTES" corresponds to Python3 'bytes' and "UNICODE" to Python2 'unicode', Python3 'str'. */
179extern bool INPLACE_OPERATION_MOD_BYTES_UNICODE(PyObject **operand1, PyObject *operand2);
180#endif
181
182#if PYTHON_VERSION >= 0x300
183/* Code referring to "BYTES" corresponds to Python3 'bytes' and "TUPLE" to Python 'tuple'. */
184extern bool INPLACE_OPERATION_MOD_BYTES_TUPLE(PyObject **operand1, PyObject *operand2);
185#endif
186
187#if PYTHON_VERSION >= 0x300
188/* Code referring to "BYTES" corresponds to Python3 'bytes' and "LIST" to Python 'list'. */
189extern bool INPLACE_OPERATION_MOD_BYTES_LIST(PyObject **operand1, PyObject *operand2);
190#endif
191
192#if PYTHON_VERSION >= 0x300
193/* Code referring to "BYTES" corresponds to Python3 'bytes' and "DICT" to Python 'dict'. */
194extern bool INPLACE_OPERATION_MOD_BYTES_DICT(PyObject **operand1, PyObject *operand2);
195#endif
196
197#if PYTHON_VERSION >= 0x300
198/* Code referring to "BYTES" corresponds to Python3 'bytes' and "OBJECT" to any Python object. */
199extern bool INPLACE_OPERATION_MOD_BYTES_OBJECT(PyObject **operand1, PyObject *operand2);
200#endif
201
202/* Code referring to "OBJECT" corresponds to any Python object and "OBJECT" to any Python object. */
203extern bool INPLACE_OPERATION_MOD_OBJECT_OBJECT(PyObject **operand1, PyObject *operand2);
204
205// Part of "Nuitka", an optimizing Python compiler that is compatible and
206// integrates with CPython, but also works on its own.
207//
208// Licensed under the Apache License, Version 2.0 (the "License");
209// you may not use this file except in compliance with the License.
210// You may obtain a copy of the License at
211//
212// http://www.apache.org/licenses/LICENSE-2.0
213//
214// Unless required by applicable law or agreed to in writing, software
215// distributed under the License is distributed on an "AS IS" BASIS,
216// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
217// See the License for the specific language governing permissions and
218// limitations under the License.