1 /*[clinic input]
2 preserve
3 [clinic start generated code]*/
4
5 PyDoc_STRVAR(array_array___copy____doc__,
6 "__copy__($self, /)\n"
7 "--\n"
8 "\n"
9 "Return a copy of the array.");
10
11 #define ARRAY_ARRAY___COPY___METHODDEF \
12 {"__copy__", (PyCFunction)array_array___copy__, METH_NOARGS, array_array___copy____doc__},
13
14 static PyObject *
15 array_array___copy___impl(arrayobject *self);
16
17 static PyObject *
array_array___copy__(arrayobject * self,PyObject * Py_UNUSED (ignored))18 array_array___copy__(arrayobject *self, PyObject *Py_UNUSED(ignored))
19 {
20 return array_array___copy___impl(self);
21 }
22
23 PyDoc_STRVAR(array_array___deepcopy____doc__,
24 "__deepcopy__($self, unused, /)\n"
25 "--\n"
26 "\n"
27 "Return a copy of the array.");
28
29 #define ARRAY_ARRAY___DEEPCOPY___METHODDEF \
30 {"__deepcopy__", (PyCFunction)array_array___deepcopy__, METH_O, array_array___deepcopy____doc__},
31
32 PyDoc_STRVAR(array_array_count__doc__,
33 "count($self, v, /)\n"
34 "--\n"
35 "\n"
36 "Return number of occurrences of v in the array.");
37
38 #define ARRAY_ARRAY_COUNT_METHODDEF \
39 {"count", (PyCFunction)array_array_count, METH_O, array_array_count__doc__},
40
41 PyDoc_STRVAR(array_array_index__doc__,
42 "index($self, v, start=0, stop=sys.maxsize, /)\n"
43 "--\n"
44 "\n"
45 "Return index of first occurrence of v in the array.\n"
46 "\n"
47 "Raise ValueError if the value is not present.");
48
49 #define ARRAY_ARRAY_INDEX_METHODDEF \
50 {"index", _PyCFunction_CAST(array_array_index), METH_FASTCALL, array_array_index__doc__},
51
52 static PyObject *
53 array_array_index_impl(arrayobject *self, PyObject *v, Py_ssize_t start,
54 Py_ssize_t stop);
55
56 static PyObject *
array_array_index(arrayobject * self,PyObject * const * args,Py_ssize_t nargs)57 array_array_index(arrayobject *self, PyObject *const *args, Py_ssize_t nargs)
58 {
59 PyObject *return_value = NULL;
60 PyObject *v;
61 Py_ssize_t start = 0;
62 Py_ssize_t stop = PY_SSIZE_T_MAX;
63
64 if (!_PyArg_CheckPositional("index", nargs, 1, 3)) {
65 goto exit;
66 }
67 v = args[0];
68 if (nargs < 2) {
69 goto skip_optional;
70 }
71 if (!_PyEval_SliceIndexNotNone(args[1], &start)) {
72 goto exit;
73 }
74 if (nargs < 3) {
75 goto skip_optional;
76 }
77 if (!_PyEval_SliceIndexNotNone(args[2], &stop)) {
78 goto exit;
79 }
80 skip_optional:
81 return_value = array_array_index_impl(self, v, start, stop);
82
83 exit:
84 return return_value;
85 }
86
87 PyDoc_STRVAR(array_array_remove__doc__,
88 "remove($self, v, /)\n"
89 "--\n"
90 "\n"
91 "Remove the first occurrence of v in the array.");
92
93 #define ARRAY_ARRAY_REMOVE_METHODDEF \
94 {"remove", (PyCFunction)array_array_remove, METH_O, array_array_remove__doc__},
95
96 PyDoc_STRVAR(array_array_pop__doc__,
97 "pop($self, i=-1, /)\n"
98 "--\n"
99 "\n"
100 "Return the i-th element and delete it from the array.\n"
101 "\n"
102 "i defaults to -1.");
103
104 #define ARRAY_ARRAY_POP_METHODDEF \
105 {"pop", _PyCFunction_CAST(array_array_pop), METH_FASTCALL, array_array_pop__doc__},
106
107 static PyObject *
108 array_array_pop_impl(arrayobject *self, Py_ssize_t i);
109
110 static PyObject *
array_array_pop(arrayobject * self,PyObject * const * args,Py_ssize_t nargs)111 array_array_pop(arrayobject *self, PyObject *const *args, Py_ssize_t nargs)
112 {
113 PyObject *return_value = NULL;
114 Py_ssize_t i = -1;
115
116 if (!_PyArg_CheckPositional("pop", nargs, 0, 1)) {
117 goto exit;
118 }
119 if (nargs < 1) {
120 goto skip_optional;
121 }
122 {
123 Py_ssize_t ival = -1;
124 PyObject *iobj = _PyNumber_Index(args[0]);
125 if (iobj != NULL) {
126 ival = PyLong_AsSsize_t(iobj);
127 Py_DECREF(iobj);
128 }
129 if (ival == -1 && PyErr_Occurred()) {
130 goto exit;
131 }
132 i = ival;
133 }
134 skip_optional:
135 return_value = array_array_pop_impl(self, i);
136
137 exit:
138 return return_value;
139 }
140
141 PyDoc_STRVAR(array_array_extend__doc__,
142 "extend($self, bb, /)\n"
143 "--\n"
144 "\n"
145 "Append items to the end of the array.");
146
147 #define ARRAY_ARRAY_EXTEND_METHODDEF \
148 {"extend", _PyCFunction_CAST(array_array_extend), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, array_array_extend__doc__},
149
150 static PyObject *
151 array_array_extend_impl(arrayobject *self, PyTypeObject *cls, PyObject *bb);
152
153 static PyObject *
array_array_extend(arrayobject * self,PyTypeObject * cls,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)154 array_array_extend(arrayobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
155 {
156 PyObject *return_value = NULL;
157 static const char * const _keywords[] = {"", NULL};
158 static _PyArg_Parser _parser = {NULL, _keywords, "extend", 0};
159 PyObject *argsbuf[1];
160 PyObject *bb;
161
162 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
163 if (!args) {
164 goto exit;
165 }
166 bb = args[0];
167 return_value = array_array_extend_impl(self, cls, bb);
168
169 exit:
170 return return_value;
171 }
172
173 PyDoc_STRVAR(array_array_insert__doc__,
174 "insert($self, i, v, /)\n"
175 "--\n"
176 "\n"
177 "Insert a new item v into the array before position i.");
178
179 #define ARRAY_ARRAY_INSERT_METHODDEF \
180 {"insert", _PyCFunction_CAST(array_array_insert), METH_FASTCALL, array_array_insert__doc__},
181
182 static PyObject *
183 array_array_insert_impl(arrayobject *self, Py_ssize_t i, PyObject *v);
184
185 static PyObject *
array_array_insert(arrayobject * self,PyObject * const * args,Py_ssize_t nargs)186 array_array_insert(arrayobject *self, PyObject *const *args, Py_ssize_t nargs)
187 {
188 PyObject *return_value = NULL;
189 Py_ssize_t i;
190 PyObject *v;
191
192 if (!_PyArg_CheckPositional("insert", nargs, 2, 2)) {
193 goto exit;
194 }
195 {
196 Py_ssize_t ival = -1;
197 PyObject *iobj = _PyNumber_Index(args[0]);
198 if (iobj != NULL) {
199 ival = PyLong_AsSsize_t(iobj);
200 Py_DECREF(iobj);
201 }
202 if (ival == -1 && PyErr_Occurred()) {
203 goto exit;
204 }
205 i = ival;
206 }
207 v = args[1];
208 return_value = array_array_insert_impl(self, i, v);
209
210 exit:
211 return return_value;
212 }
213
214 PyDoc_STRVAR(array_array_buffer_info__doc__,
215 "buffer_info($self, /)\n"
216 "--\n"
217 "\n"
218 "Return a tuple (address, length) giving the current memory address and the length in items of the buffer used to hold array\'s contents.\n"
219 "\n"
220 "The length should be multiplied by the itemsize attribute to calculate\n"
221 "the buffer length in bytes.");
222
223 #define ARRAY_ARRAY_BUFFER_INFO_METHODDEF \
224 {"buffer_info", (PyCFunction)array_array_buffer_info, METH_NOARGS, array_array_buffer_info__doc__},
225
226 static PyObject *
227 array_array_buffer_info_impl(arrayobject *self);
228
229 static PyObject *
array_array_buffer_info(arrayobject * self,PyObject * Py_UNUSED (ignored))230 array_array_buffer_info(arrayobject *self, PyObject *Py_UNUSED(ignored))
231 {
232 return array_array_buffer_info_impl(self);
233 }
234
235 PyDoc_STRVAR(array_array_append__doc__,
236 "append($self, v, /)\n"
237 "--\n"
238 "\n"
239 "Append new value v to the end of the array.");
240
241 #define ARRAY_ARRAY_APPEND_METHODDEF \
242 {"append", (PyCFunction)array_array_append, METH_O, array_array_append__doc__},
243
244 PyDoc_STRVAR(array_array_byteswap__doc__,
245 "byteswap($self, /)\n"
246 "--\n"
247 "\n"
248 "Byteswap all items of the array.\n"
249 "\n"
250 "If the items in the array are not 1, 2, 4, or 8 bytes in size, RuntimeError is\n"
251 "raised.");
252
253 #define ARRAY_ARRAY_BYTESWAP_METHODDEF \
254 {"byteswap", (PyCFunction)array_array_byteswap, METH_NOARGS, array_array_byteswap__doc__},
255
256 static PyObject *
257 array_array_byteswap_impl(arrayobject *self);
258
259 static PyObject *
array_array_byteswap(arrayobject * self,PyObject * Py_UNUSED (ignored))260 array_array_byteswap(arrayobject *self, PyObject *Py_UNUSED(ignored))
261 {
262 return array_array_byteswap_impl(self);
263 }
264
265 PyDoc_STRVAR(array_array_reverse__doc__,
266 "reverse($self, /)\n"
267 "--\n"
268 "\n"
269 "Reverse the order of the items in the array.");
270
271 #define ARRAY_ARRAY_REVERSE_METHODDEF \
272 {"reverse", (PyCFunction)array_array_reverse, METH_NOARGS, array_array_reverse__doc__},
273
274 static PyObject *
275 array_array_reverse_impl(arrayobject *self);
276
277 static PyObject *
array_array_reverse(arrayobject * self,PyObject * Py_UNUSED (ignored))278 array_array_reverse(arrayobject *self, PyObject *Py_UNUSED(ignored))
279 {
280 return array_array_reverse_impl(self);
281 }
282
283 PyDoc_STRVAR(array_array_fromfile__doc__,
284 "fromfile($self, f, n, /)\n"
285 "--\n"
286 "\n"
287 "Read n objects from the file object f and append them to the end of the array.");
288
289 #define ARRAY_ARRAY_FROMFILE_METHODDEF \
290 {"fromfile", _PyCFunction_CAST(array_array_fromfile), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, array_array_fromfile__doc__},
291
292 static PyObject *
293 array_array_fromfile_impl(arrayobject *self, PyTypeObject *cls, PyObject *f,
294 Py_ssize_t n);
295
296 static PyObject *
array_array_fromfile(arrayobject * self,PyTypeObject * cls,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)297 array_array_fromfile(arrayobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
298 {
299 PyObject *return_value = NULL;
300 static const char * const _keywords[] = {"", "", NULL};
301 static _PyArg_Parser _parser = {NULL, _keywords, "fromfile", 0};
302 PyObject *argsbuf[2];
303 PyObject *f;
304 Py_ssize_t n;
305
306 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf);
307 if (!args) {
308 goto exit;
309 }
310 f = args[0];
311 {
312 Py_ssize_t ival = -1;
313 PyObject *iobj = _PyNumber_Index(args[1]);
314 if (iobj != NULL) {
315 ival = PyLong_AsSsize_t(iobj);
316 Py_DECREF(iobj);
317 }
318 if (ival == -1 && PyErr_Occurred()) {
319 goto exit;
320 }
321 n = ival;
322 }
323 return_value = array_array_fromfile_impl(self, cls, f, n);
324
325 exit:
326 return return_value;
327 }
328
329 PyDoc_STRVAR(array_array_tofile__doc__,
330 "tofile($self, f, /)\n"
331 "--\n"
332 "\n"
333 "Write all items (as machine values) to the file object f.");
334
335 #define ARRAY_ARRAY_TOFILE_METHODDEF \
336 {"tofile", _PyCFunction_CAST(array_array_tofile), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, array_array_tofile__doc__},
337
338 static PyObject *
339 array_array_tofile_impl(arrayobject *self, PyTypeObject *cls, PyObject *f);
340
341 static PyObject *
array_array_tofile(arrayobject * self,PyTypeObject * cls,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)342 array_array_tofile(arrayobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
343 {
344 PyObject *return_value = NULL;
345 static const char * const _keywords[] = {"", NULL};
346 static _PyArg_Parser _parser = {NULL, _keywords, "tofile", 0};
347 PyObject *argsbuf[1];
348 PyObject *f;
349
350 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
351 if (!args) {
352 goto exit;
353 }
354 f = args[0];
355 return_value = array_array_tofile_impl(self, cls, f);
356
357 exit:
358 return return_value;
359 }
360
361 PyDoc_STRVAR(array_array_fromlist__doc__,
362 "fromlist($self, list, /)\n"
363 "--\n"
364 "\n"
365 "Append items to array from list.");
366
367 #define ARRAY_ARRAY_FROMLIST_METHODDEF \
368 {"fromlist", (PyCFunction)array_array_fromlist, METH_O, array_array_fromlist__doc__},
369
370 PyDoc_STRVAR(array_array_tolist__doc__,
371 "tolist($self, /)\n"
372 "--\n"
373 "\n"
374 "Convert array to an ordinary list with the same items.");
375
376 #define ARRAY_ARRAY_TOLIST_METHODDEF \
377 {"tolist", (PyCFunction)array_array_tolist, METH_NOARGS, array_array_tolist__doc__},
378
379 static PyObject *
380 array_array_tolist_impl(arrayobject *self);
381
382 static PyObject *
array_array_tolist(arrayobject * self,PyObject * Py_UNUSED (ignored))383 array_array_tolist(arrayobject *self, PyObject *Py_UNUSED(ignored))
384 {
385 return array_array_tolist_impl(self);
386 }
387
388 PyDoc_STRVAR(array_array_frombytes__doc__,
389 "frombytes($self, buffer, /)\n"
390 "--\n"
391 "\n"
392 "Appends items from the string, interpreting it as an array of machine values, as if it had been read from a file using the fromfile() method.");
393
394 #define ARRAY_ARRAY_FROMBYTES_METHODDEF \
395 {"frombytes", (PyCFunction)array_array_frombytes, METH_O, array_array_frombytes__doc__},
396
397 static PyObject *
398 array_array_frombytes_impl(arrayobject *self, Py_buffer *buffer);
399
400 static PyObject *
array_array_frombytes(arrayobject * self,PyObject * arg)401 array_array_frombytes(arrayobject *self, PyObject *arg)
402 {
403 PyObject *return_value = NULL;
404 Py_buffer buffer = {NULL, NULL};
405
406 if (PyObject_GetBuffer(arg, &buffer, PyBUF_SIMPLE) != 0) {
407 goto exit;
408 }
409 if (!PyBuffer_IsContiguous(&buffer, 'C')) {
410 _PyArg_BadArgument("frombytes", "argument", "contiguous buffer", arg);
411 goto exit;
412 }
413 return_value = array_array_frombytes_impl(self, &buffer);
414
415 exit:
416 /* Cleanup for buffer */
417 if (buffer.obj) {
418 PyBuffer_Release(&buffer);
419 }
420
421 return return_value;
422 }
423
424 PyDoc_STRVAR(array_array_tobytes__doc__,
425 "tobytes($self, /)\n"
426 "--\n"
427 "\n"
428 "Convert the array to an array of machine values and return the bytes representation.");
429
430 #define ARRAY_ARRAY_TOBYTES_METHODDEF \
431 {"tobytes", (PyCFunction)array_array_tobytes, METH_NOARGS, array_array_tobytes__doc__},
432
433 static PyObject *
434 array_array_tobytes_impl(arrayobject *self);
435
436 static PyObject *
array_array_tobytes(arrayobject * self,PyObject * Py_UNUSED (ignored))437 array_array_tobytes(arrayobject *self, PyObject *Py_UNUSED(ignored))
438 {
439 return array_array_tobytes_impl(self);
440 }
441
442 PyDoc_STRVAR(array_array_fromunicode__doc__,
443 "fromunicode($self, ustr, /)\n"
444 "--\n"
445 "\n"
446 "Extends this array with data from the unicode string ustr.\n"
447 "\n"
448 "The array must be a unicode type array; otherwise a ValueError is raised.\n"
449 "Use array.frombytes(ustr.encode(...)) to append Unicode data to an array of\n"
450 "some other type.");
451
452 #define ARRAY_ARRAY_FROMUNICODE_METHODDEF \
453 {"fromunicode", (PyCFunction)array_array_fromunicode, METH_O, array_array_fromunicode__doc__},
454
455 static PyObject *
456 array_array_fromunicode_impl(arrayobject *self, PyObject *ustr);
457
458 static PyObject *
array_array_fromunicode(arrayobject * self,PyObject * arg)459 array_array_fromunicode(arrayobject *self, PyObject *arg)
460 {
461 PyObject *return_value = NULL;
462 PyObject *ustr;
463
464 if (!PyUnicode_Check(arg)) {
465 _PyArg_BadArgument("fromunicode", "argument", "str", arg);
466 goto exit;
467 }
468 if (PyUnicode_READY(arg) == -1) {
469 goto exit;
470 }
471 ustr = arg;
472 return_value = array_array_fromunicode_impl(self, ustr);
473
474 exit:
475 return return_value;
476 }
477
478 PyDoc_STRVAR(array_array_tounicode__doc__,
479 "tounicode($self, /)\n"
480 "--\n"
481 "\n"
482 "Extends this array with data from the unicode string ustr.\n"
483 "\n"
484 "Convert the array to a unicode string. The array must be a unicode type array;\n"
485 "otherwise a ValueError is raised. Use array.tobytes().decode() to obtain a\n"
486 "unicode string from an array of some other type.");
487
488 #define ARRAY_ARRAY_TOUNICODE_METHODDEF \
489 {"tounicode", (PyCFunction)array_array_tounicode, METH_NOARGS, array_array_tounicode__doc__},
490
491 static PyObject *
492 array_array_tounicode_impl(arrayobject *self);
493
494 static PyObject *
array_array_tounicode(arrayobject * self,PyObject * Py_UNUSED (ignored))495 array_array_tounicode(arrayobject *self, PyObject *Py_UNUSED(ignored))
496 {
497 return array_array_tounicode_impl(self);
498 }
499
500 PyDoc_STRVAR(array_array___sizeof____doc__,
501 "__sizeof__($self, /)\n"
502 "--\n"
503 "\n"
504 "Size of the array in memory, in bytes.");
505
506 #define ARRAY_ARRAY___SIZEOF___METHODDEF \
507 {"__sizeof__", (PyCFunction)array_array___sizeof__, METH_NOARGS, array_array___sizeof____doc__},
508
509 static PyObject *
510 array_array___sizeof___impl(arrayobject *self);
511
512 static PyObject *
array_array___sizeof__(arrayobject * self,PyObject * Py_UNUSED (ignored))513 array_array___sizeof__(arrayobject *self, PyObject *Py_UNUSED(ignored))
514 {
515 return array_array___sizeof___impl(self);
516 }
517
518 PyDoc_STRVAR(array__array_reconstructor__doc__,
519 "_array_reconstructor($module, arraytype, typecode, mformat_code, items,\n"
520 " /)\n"
521 "--\n"
522 "\n"
523 "Internal. Used for pickling support.");
524
525 #define ARRAY__ARRAY_RECONSTRUCTOR_METHODDEF \
526 {"_array_reconstructor", _PyCFunction_CAST(array__array_reconstructor), METH_FASTCALL, array__array_reconstructor__doc__},
527
528 static PyObject *
529 array__array_reconstructor_impl(PyObject *module, PyTypeObject *arraytype,
530 int typecode,
531 enum machine_format_code mformat_code,
532 PyObject *items);
533
534 static PyObject *
array__array_reconstructor(PyObject * module,PyObject * const * args,Py_ssize_t nargs)535 array__array_reconstructor(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
536 {
537 PyObject *return_value = NULL;
538 PyTypeObject *arraytype;
539 int typecode;
540 enum machine_format_code mformat_code;
541 PyObject *items;
542
543 if (!_PyArg_CheckPositional("_array_reconstructor", nargs, 4, 4)) {
544 goto exit;
545 }
546 arraytype = (PyTypeObject *)args[0];
547 if (!PyUnicode_Check(args[1])) {
548 _PyArg_BadArgument("_array_reconstructor", "argument 2", "a unicode character", args[1]);
549 goto exit;
550 }
551 if (PyUnicode_READY(args[1])) {
552 goto exit;
553 }
554 if (PyUnicode_GET_LENGTH(args[1]) != 1) {
555 _PyArg_BadArgument("_array_reconstructor", "argument 2", "a unicode character", args[1]);
556 goto exit;
557 }
558 typecode = PyUnicode_READ_CHAR(args[1], 0);
559 mformat_code = _PyLong_AsInt(args[2]);
560 if (mformat_code == -1 && PyErr_Occurred()) {
561 goto exit;
562 }
563 items = args[3];
564 return_value = array__array_reconstructor_impl(module, arraytype, typecode, mformat_code, items);
565
566 exit:
567 return return_value;
568 }
569
570 PyDoc_STRVAR(array_array___reduce_ex____doc__,
571 "__reduce_ex__($self, value, /)\n"
572 "--\n"
573 "\n"
574 "Return state information for pickling.");
575
576 #define ARRAY_ARRAY___REDUCE_EX___METHODDEF \
577 {"__reduce_ex__", _PyCFunction_CAST(array_array___reduce_ex__), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, array_array___reduce_ex____doc__},
578
579 static PyObject *
580 array_array___reduce_ex___impl(arrayobject *self, PyTypeObject *cls,
581 PyObject *value);
582
583 static PyObject *
array_array___reduce_ex__(arrayobject * self,PyTypeObject * cls,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)584 array_array___reduce_ex__(arrayobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
585 {
586 PyObject *return_value = NULL;
587 static const char * const _keywords[] = {"", NULL};
588 static _PyArg_Parser _parser = {NULL, _keywords, "__reduce_ex__", 0};
589 PyObject *argsbuf[1];
590 PyObject *value;
591
592 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
593 if (!args) {
594 goto exit;
595 }
596 value = args[0];
597 return_value = array_array___reduce_ex___impl(self, cls, value);
598
599 exit:
600 return return_value;
601 }
602
603 PyDoc_STRVAR(array_arrayiterator___reduce____doc__,
604 "__reduce__($self, /)\n"
605 "--\n"
606 "\n"
607 "Return state information for pickling.");
608
609 #define ARRAY_ARRAYITERATOR___REDUCE___METHODDEF \
610 {"__reduce__", _PyCFunction_CAST(array_arrayiterator___reduce__), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, array_arrayiterator___reduce____doc__},
611
612 static PyObject *
613 array_arrayiterator___reduce___impl(arrayiterobject *self, PyTypeObject *cls);
614
615 static PyObject *
array_arrayiterator___reduce__(arrayiterobject * self,PyTypeObject * cls,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)616 array_arrayiterator___reduce__(arrayiterobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
617 {
618 if (nargs) {
619 PyErr_SetString(PyExc_TypeError, "__reduce__() takes no arguments");
620 return NULL;
621 }
622 return array_arrayiterator___reduce___impl(self, cls);
623 }
624
625 PyDoc_STRVAR(array_arrayiterator___setstate____doc__,
626 "__setstate__($self, state, /)\n"
627 "--\n"
628 "\n"
629 "Set state information for unpickling.");
630
631 #define ARRAY_ARRAYITERATOR___SETSTATE___METHODDEF \
632 {"__setstate__", (PyCFunction)array_arrayiterator___setstate__, METH_O, array_arrayiterator___setstate____doc__},
633 /*[clinic end generated code: output=85a5fec90d9615b9 input=a9049054013a1b77]*/
634