Nuitka
The Python compiler
Loading...
Searching...
No Matches
HelpersListsGenerated.c
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 CodeTemplateMakeListSmall.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
10PyObject *MAKE_LIST1(PyThreadState *tstate, PyObject *arg0) {
11
12 PyObject *result = MAKE_LIST_EMPTY(tstate, 1);
13
14 if (unlikely(result == NULL)) {
15 return NULL;
16 }
17
18 CHECK_OBJECT(arg0);
19 Py_INCREF(arg0);
20 PyList_SET_ITEM(result, 0, arg0);
21
22 return result;
23}
24PyObject *MAKE_LIST2(PyThreadState *tstate, PyObject *arg0, PyObject *arg1) {
25
26 PyObject *result = MAKE_LIST_EMPTY(tstate, 2);
27
28 if (unlikely(result == NULL)) {
29 return NULL;
30 }
31
32 CHECK_OBJECT(arg0);
33 Py_INCREF(arg0);
34 PyList_SET_ITEM(result, 0, arg0);
35
36 CHECK_OBJECT(arg1);
37 Py_INCREF(arg1);
38 PyList_SET_ITEM(result, 1, arg1);
39
40 return result;
41}
42PyObject *MAKE_LIST3(PyThreadState *tstate, PyObject *arg0, PyObject *arg1, PyObject *arg2) {
43
44 PyObject *result = MAKE_LIST_EMPTY(tstate, 3);
45
46 if (unlikely(result == NULL)) {
47 return NULL;
48 }
49
50 CHECK_OBJECT(arg0);
51 Py_INCREF(arg0);
52 PyList_SET_ITEM(result, 0, arg0);
53
54 CHECK_OBJECT(arg1);
55 Py_INCREF(arg1);
56 PyList_SET_ITEM(result, 1, arg1);
57
58 CHECK_OBJECT(arg2);
59 Py_INCREF(arg2);
60 PyList_SET_ITEM(result, 2, arg2);
61
62 return result;
63}
64PyObject *MAKE_LIST4(PyThreadState *tstate, PyObject *list) {
65 CHECK_OBJECT(list);
66 assert(PyList_CheckExact(list));
67 assert(PyList_GET_SIZE(list) == 4);
68
69 PyObject *result = MAKE_LIST_EMPTY(tstate, 4);
70
71 if (unlikely(result == NULL)) {
72 return NULL;
73 }
74
75 {
76 PyObject *item = PyList_GET_ITEM(list, 0);
77 Py_INCREF(item);
78 PyList_SET_ITEM(result, 0, item);
79 }
80 {
81 PyObject *item = PyList_GET_ITEM(list, 1);
82 Py_INCREF(item);
83 PyList_SET_ITEM(result, 1, item);
84 }
85 {
86 PyObject *item = PyList_GET_ITEM(list, 2);
87 Py_INCREF(item);
88 PyList_SET_ITEM(result, 2, item);
89 }
90 {
91 PyObject *item = PyList_GET_ITEM(list, 3);
92 Py_INCREF(item);
93 PyList_SET_ITEM(result, 3, item);
94 }
95
96 return result;
97}
98PyObject *MAKE_LIST5(PyThreadState *tstate, PyObject *list) {
99 CHECK_OBJECT(list);
100 assert(PyList_CheckExact(list));
101 assert(PyList_GET_SIZE(list) == 5);
102
103 PyObject *result = MAKE_LIST_EMPTY(tstate, 5);
104
105 if (unlikely(result == NULL)) {
106 return NULL;
107 }
108
109 {
110 PyObject *item = PyList_GET_ITEM(list, 0);
111 Py_INCREF(item);
112 PyList_SET_ITEM(result, 0, item);
113 }
114 {
115 PyObject *item = PyList_GET_ITEM(list, 1);
116 Py_INCREF(item);
117 PyList_SET_ITEM(result, 1, item);
118 }
119 {
120 PyObject *item = PyList_GET_ITEM(list, 2);
121 Py_INCREF(item);
122 PyList_SET_ITEM(result, 2, item);
123 }
124 {
125 PyObject *item = PyList_GET_ITEM(list, 3);
126 Py_INCREF(item);
127 PyList_SET_ITEM(result, 3, item);
128 }
129 {
130 PyObject *item = PyList_GET_ITEM(list, 4);
131 Py_INCREF(item);
132 PyList_SET_ITEM(result, 4, item);
133 }
134
135 return result;
136}
137PyObject *MAKE_LIST6(PyThreadState *tstate, PyObject *list) {
138 CHECK_OBJECT(list);
139 assert(PyList_CheckExact(list));
140 assert(PyList_GET_SIZE(list) == 6);
141
142 PyObject *result = MAKE_LIST_EMPTY(tstate, 6);
143
144 if (unlikely(result == NULL)) {
145 return NULL;
146 }
147
148 {
149 PyObject *item = PyList_GET_ITEM(list, 0);
150 Py_INCREF(item);
151 PyList_SET_ITEM(result, 0, item);
152 }
153 {
154 PyObject *item = PyList_GET_ITEM(list, 1);
155 Py_INCREF(item);
156 PyList_SET_ITEM(result, 1, item);
157 }
158 {
159 PyObject *item = PyList_GET_ITEM(list, 2);
160 Py_INCREF(item);
161 PyList_SET_ITEM(result, 2, item);
162 }
163 {
164 PyObject *item = PyList_GET_ITEM(list, 3);
165 Py_INCREF(item);
166 PyList_SET_ITEM(result, 3, item);
167 }
168 {
169 PyObject *item = PyList_GET_ITEM(list, 4);
170 Py_INCREF(item);
171 PyList_SET_ITEM(result, 4, item);
172 }
173 {
174 PyObject *item = PyList_GET_ITEM(list, 5);
175 Py_INCREF(item);
176 PyList_SET_ITEM(result, 5, item);
177 }
178
179 return result;
180}
181PyObject *MAKE_LIST7(PyThreadState *tstate, PyObject *list) {
182 CHECK_OBJECT(list);
183 assert(PyList_CheckExact(list));
184 assert(PyList_GET_SIZE(list) == 7);
185
186 PyObject *result = MAKE_LIST_EMPTY(tstate, 7);
187
188 if (unlikely(result == NULL)) {
189 return NULL;
190 }
191
192 {
193 PyObject *item = PyList_GET_ITEM(list, 0);
194 Py_INCREF(item);
195 PyList_SET_ITEM(result, 0, item);
196 }
197 {
198 PyObject *item = PyList_GET_ITEM(list, 1);
199 Py_INCREF(item);
200 PyList_SET_ITEM(result, 1, item);
201 }
202 {
203 PyObject *item = PyList_GET_ITEM(list, 2);
204 Py_INCREF(item);
205 PyList_SET_ITEM(result, 2, item);
206 }
207 {
208 PyObject *item = PyList_GET_ITEM(list, 3);
209 Py_INCREF(item);
210 PyList_SET_ITEM(result, 3, item);
211 }
212 {
213 PyObject *item = PyList_GET_ITEM(list, 4);
214 Py_INCREF(item);
215 PyList_SET_ITEM(result, 4, item);
216 }
217 {
218 PyObject *item = PyList_GET_ITEM(list, 5);
219 Py_INCREF(item);
220 PyList_SET_ITEM(result, 5, item);
221 }
222 {
223 PyObject *item = PyList_GET_ITEM(list, 6);
224 Py_INCREF(item);
225 PyList_SET_ITEM(result, 6, item);
226 }
227
228 return result;
229}
230PyObject *MAKE_LIST8(PyThreadState *tstate, PyObject *list) {
231 CHECK_OBJECT(list);
232 assert(PyList_CheckExact(list));
233 assert(PyList_GET_SIZE(list) == 8);
234
235 PyObject *result = MAKE_LIST_EMPTY(tstate, 8);
236
237 if (unlikely(result == NULL)) {
238 return NULL;
239 }
240
241 {
242 PyObject *item = PyList_GET_ITEM(list, 0);
243 Py_INCREF(item);
244 PyList_SET_ITEM(result, 0, item);
245 }
246 {
247 PyObject *item = PyList_GET_ITEM(list, 1);
248 Py_INCREF(item);
249 PyList_SET_ITEM(result, 1, item);
250 }
251 {
252 PyObject *item = PyList_GET_ITEM(list, 2);
253 Py_INCREF(item);
254 PyList_SET_ITEM(result, 2, item);
255 }
256 {
257 PyObject *item = PyList_GET_ITEM(list, 3);
258 Py_INCREF(item);
259 PyList_SET_ITEM(result, 3, item);
260 }
261 {
262 PyObject *item = PyList_GET_ITEM(list, 4);
263 Py_INCREF(item);
264 PyList_SET_ITEM(result, 4, item);
265 }
266 {
267 PyObject *item = PyList_GET_ITEM(list, 5);
268 Py_INCREF(item);
269 PyList_SET_ITEM(result, 5, item);
270 }
271 {
272 PyObject *item = PyList_GET_ITEM(list, 6);
273 Py_INCREF(item);
274 PyList_SET_ITEM(result, 6, item);
275 }
276 {
277 PyObject *item = PyList_GET_ITEM(list, 7);
278 Py_INCREF(item);
279 PyList_SET_ITEM(result, 7, item);
280 }
281
282 return result;
283}
284PyObject *MAKE_LIST9(PyThreadState *tstate, PyObject *list) {
285 CHECK_OBJECT(list);
286 assert(PyList_CheckExact(list));
287 assert(PyList_GET_SIZE(list) == 9);
288
289 PyObject *result = MAKE_LIST_EMPTY(tstate, 9);
290
291 if (unlikely(result == NULL)) {
292 return NULL;
293 }
294
295 {
296 PyObject *item = PyList_GET_ITEM(list, 0);
297 Py_INCREF(item);
298 PyList_SET_ITEM(result, 0, item);
299 }
300 {
301 PyObject *item = PyList_GET_ITEM(list, 1);
302 Py_INCREF(item);
303 PyList_SET_ITEM(result, 1, item);
304 }
305 {
306 PyObject *item = PyList_GET_ITEM(list, 2);
307 Py_INCREF(item);
308 PyList_SET_ITEM(result, 2, item);
309 }
310 {
311 PyObject *item = PyList_GET_ITEM(list, 3);
312 Py_INCREF(item);
313 PyList_SET_ITEM(result, 3, item);
314 }
315 {
316 PyObject *item = PyList_GET_ITEM(list, 4);
317 Py_INCREF(item);
318 PyList_SET_ITEM(result, 4, item);
319 }
320 {
321 PyObject *item = PyList_GET_ITEM(list, 5);
322 Py_INCREF(item);
323 PyList_SET_ITEM(result, 5, item);
324 }
325 {
326 PyObject *item = PyList_GET_ITEM(list, 6);
327 Py_INCREF(item);
328 PyList_SET_ITEM(result, 6, item);
329 }
330 {
331 PyObject *item = PyList_GET_ITEM(list, 7);
332 Py_INCREF(item);
333 PyList_SET_ITEM(result, 7, item);
334 }
335 {
336 PyObject *item = PyList_GET_ITEM(list, 8);
337 Py_INCREF(item);
338 PyList_SET_ITEM(result, 8, item);
339 }
340
341 return result;
342}
343PyObject *MAKE_LIST10(PyThreadState *tstate, PyObject *list) {
344 CHECK_OBJECT(list);
345 assert(PyList_CheckExact(list));
346 assert(PyList_GET_SIZE(list) == 10);
347
348 PyObject *result = MAKE_LIST_EMPTY(tstate, 10);
349
350 if (unlikely(result == NULL)) {
351 return NULL;
352 }
353
354 {
355 PyObject *item = PyList_GET_ITEM(list, 0);
356 Py_INCREF(item);
357 PyList_SET_ITEM(result, 0, item);
358 }
359 {
360 PyObject *item = PyList_GET_ITEM(list, 1);
361 Py_INCREF(item);
362 PyList_SET_ITEM(result, 1, item);
363 }
364 {
365 PyObject *item = PyList_GET_ITEM(list, 2);
366 Py_INCREF(item);
367 PyList_SET_ITEM(result, 2, item);
368 }
369 {
370 PyObject *item = PyList_GET_ITEM(list, 3);
371 Py_INCREF(item);
372 PyList_SET_ITEM(result, 3, item);
373 }
374 {
375 PyObject *item = PyList_GET_ITEM(list, 4);
376 Py_INCREF(item);
377 PyList_SET_ITEM(result, 4, item);
378 }
379 {
380 PyObject *item = PyList_GET_ITEM(list, 5);
381 Py_INCREF(item);
382 PyList_SET_ITEM(result, 5, item);
383 }
384 {
385 PyObject *item = PyList_GET_ITEM(list, 6);
386 Py_INCREF(item);
387 PyList_SET_ITEM(result, 6, item);
388 }
389 {
390 PyObject *item = PyList_GET_ITEM(list, 7);
391 Py_INCREF(item);
392 PyList_SET_ITEM(result, 7, item);
393 }
394 {
395 PyObject *item = PyList_GET_ITEM(list, 8);
396 Py_INCREF(item);
397 PyList_SET_ITEM(result, 8, item);
398 }
399 {
400 PyObject *item = PyList_GET_ITEM(list, 9);
401 Py_INCREF(item);
402 PyList_SET_ITEM(result, 9, item);
403 }
404
405 return result;
406}
407PyObject *MAKE_LIST11(PyThreadState *tstate, PyObject *list) {
408 CHECK_OBJECT(list);
409 assert(PyList_CheckExact(list));
410 assert(PyList_GET_SIZE(list) == 11);
411
412 PyObject *result = MAKE_LIST_EMPTY(tstate, 11);
413
414 if (unlikely(result == NULL)) {
415 return NULL;
416 }
417
418 {
419 PyObject *item = PyList_GET_ITEM(list, 0);
420 Py_INCREF(item);
421 PyList_SET_ITEM(result, 0, item);
422 }
423 {
424 PyObject *item = PyList_GET_ITEM(list, 1);
425 Py_INCREF(item);
426 PyList_SET_ITEM(result, 1, item);
427 }
428 {
429 PyObject *item = PyList_GET_ITEM(list, 2);
430 Py_INCREF(item);
431 PyList_SET_ITEM(result, 2, item);
432 }
433 {
434 PyObject *item = PyList_GET_ITEM(list, 3);
435 Py_INCREF(item);
436 PyList_SET_ITEM(result, 3, item);
437 }
438 {
439 PyObject *item = PyList_GET_ITEM(list, 4);
440 Py_INCREF(item);
441 PyList_SET_ITEM(result, 4, item);
442 }
443 {
444 PyObject *item = PyList_GET_ITEM(list, 5);
445 Py_INCREF(item);
446 PyList_SET_ITEM(result, 5, item);
447 }
448 {
449 PyObject *item = PyList_GET_ITEM(list, 6);
450 Py_INCREF(item);
451 PyList_SET_ITEM(result, 6, item);
452 }
453 {
454 PyObject *item = PyList_GET_ITEM(list, 7);
455 Py_INCREF(item);
456 PyList_SET_ITEM(result, 7, item);
457 }
458 {
459 PyObject *item = PyList_GET_ITEM(list, 8);
460 Py_INCREF(item);
461 PyList_SET_ITEM(result, 8, item);
462 }
463 {
464 PyObject *item = PyList_GET_ITEM(list, 9);
465 Py_INCREF(item);
466 PyList_SET_ITEM(result, 9, item);
467 }
468 {
469 PyObject *item = PyList_GET_ITEM(list, 10);
470 Py_INCREF(item);
471 PyList_SET_ITEM(result, 10, item);
472 }
473
474 return result;
475}
476PyObject *MAKE_LIST12(PyThreadState *tstate, PyObject *list) {
477 CHECK_OBJECT(list);
478 assert(PyList_CheckExact(list));
479 assert(PyList_GET_SIZE(list) == 12);
480
481 PyObject *result = MAKE_LIST_EMPTY(tstate, 12);
482
483 if (unlikely(result == NULL)) {
484 return NULL;
485 }
486
487 {
488 PyObject *item = PyList_GET_ITEM(list, 0);
489 Py_INCREF(item);
490 PyList_SET_ITEM(result, 0, item);
491 }
492 {
493 PyObject *item = PyList_GET_ITEM(list, 1);
494 Py_INCREF(item);
495 PyList_SET_ITEM(result, 1, item);
496 }
497 {
498 PyObject *item = PyList_GET_ITEM(list, 2);
499 Py_INCREF(item);
500 PyList_SET_ITEM(result, 2, item);
501 }
502 {
503 PyObject *item = PyList_GET_ITEM(list, 3);
504 Py_INCREF(item);
505 PyList_SET_ITEM(result, 3, item);
506 }
507 {
508 PyObject *item = PyList_GET_ITEM(list, 4);
509 Py_INCREF(item);
510 PyList_SET_ITEM(result, 4, item);
511 }
512 {
513 PyObject *item = PyList_GET_ITEM(list, 5);
514 Py_INCREF(item);
515 PyList_SET_ITEM(result, 5, item);
516 }
517 {
518 PyObject *item = PyList_GET_ITEM(list, 6);
519 Py_INCREF(item);
520 PyList_SET_ITEM(result, 6, item);
521 }
522 {
523 PyObject *item = PyList_GET_ITEM(list, 7);
524 Py_INCREF(item);
525 PyList_SET_ITEM(result, 7, item);
526 }
527 {
528 PyObject *item = PyList_GET_ITEM(list, 8);
529 Py_INCREF(item);
530 PyList_SET_ITEM(result, 8, item);
531 }
532 {
533 PyObject *item = PyList_GET_ITEM(list, 9);
534 Py_INCREF(item);
535 PyList_SET_ITEM(result, 9, item);
536 }
537 {
538 PyObject *item = PyList_GET_ITEM(list, 10);
539 Py_INCREF(item);
540 PyList_SET_ITEM(result, 10, item);
541 }
542 {
543 PyObject *item = PyList_GET_ITEM(list, 11);
544 Py_INCREF(item);
545 PyList_SET_ITEM(result, 11, item);
546 }
547
548 return result;
549}
550
551// Part of "Nuitka", an optimizing Python compiler that is compatible and
552// integrates with CPython, but also works on its own.
553//
554// Licensed under the Apache License, Version 2.0 (the "License");
555// you may not use this file except in compliance with the License.
556// You may obtain a copy of the License at
557//
558// http://www.apache.org/licenses/LICENSE-2.0
559//
560// Unless required by applicable law or agreed to in writing, software
561// distributed under the License is distributed on an "AS IS" BASIS,
562// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
563// See the License for the specific language governing permissions and
564// limitations under the License.