1 /*[clinic input]
2 preserve
3 [clinic start generated code]*/
4 
5 PyDoc_STRVAR(_sre_getcodesize__doc__,
6 "getcodesize($module, /)\n"
7 "--\n"
8 "\n");
9 
10 #define _SRE_GETCODESIZE_METHODDEF    \
11     {"getcodesize", (PyCFunction)_sre_getcodesize, METH_NOARGS, _sre_getcodesize__doc__},
12 
13 static int
14 _sre_getcodesize_impl(PyObject *module);
15 
16 static PyObject *
_sre_getcodesize(PyObject * module,PyObject * Py_UNUSED (ignored))17 _sre_getcodesize(PyObject *module, PyObject *Py_UNUSED(ignored))
18 {
19     PyObject *return_value = NULL;
20     int _return_value;
21 
22     _return_value = _sre_getcodesize_impl(module);
23     if ((_return_value == -1) && PyErr_Occurred()) {
24         goto exit;
25     }
26     return_value = PyLong_FromLong((long)_return_value);
27 
28 exit:
29     return return_value;
30 }
31 
32 PyDoc_STRVAR(_sre_ascii_iscased__doc__,
33 "ascii_iscased($module, character, /)\n"
34 "--\n"
35 "\n");
36 
37 #define _SRE_ASCII_ISCASED_METHODDEF    \
38     {"ascii_iscased", (PyCFunction)_sre_ascii_iscased, METH_O, _sre_ascii_iscased__doc__},
39 
40 static int
41 _sre_ascii_iscased_impl(PyObject *module, int character);
42 
43 static PyObject *
_sre_ascii_iscased(PyObject * module,PyObject * arg)44 _sre_ascii_iscased(PyObject *module, PyObject *arg)
45 {
46     PyObject *return_value = NULL;
47     int character;
48     int _return_value;
49 
50     if (PyFloat_Check(arg)) {
51         PyErr_SetString(PyExc_TypeError,
52                         "integer argument expected, got float" );
53         goto exit;
54     }
55     character = _PyLong_AsInt(arg);
56     if (character == -1 && PyErr_Occurred()) {
57         goto exit;
58     }
59     _return_value = _sre_ascii_iscased_impl(module, character);
60     if ((_return_value == -1) && PyErr_Occurred()) {
61         goto exit;
62     }
63     return_value = PyBool_FromLong((long)_return_value);
64 
65 exit:
66     return return_value;
67 }
68 
69 PyDoc_STRVAR(_sre_unicode_iscased__doc__,
70 "unicode_iscased($module, character, /)\n"
71 "--\n"
72 "\n");
73 
74 #define _SRE_UNICODE_ISCASED_METHODDEF    \
75     {"unicode_iscased", (PyCFunction)_sre_unicode_iscased, METH_O, _sre_unicode_iscased__doc__},
76 
77 static int
78 _sre_unicode_iscased_impl(PyObject *module, int character);
79 
80 static PyObject *
_sre_unicode_iscased(PyObject * module,PyObject * arg)81 _sre_unicode_iscased(PyObject *module, PyObject *arg)
82 {
83     PyObject *return_value = NULL;
84     int character;
85     int _return_value;
86 
87     if (PyFloat_Check(arg)) {
88         PyErr_SetString(PyExc_TypeError,
89                         "integer argument expected, got float" );
90         goto exit;
91     }
92     character = _PyLong_AsInt(arg);
93     if (character == -1 && PyErr_Occurred()) {
94         goto exit;
95     }
96     _return_value = _sre_unicode_iscased_impl(module, character);
97     if ((_return_value == -1) && PyErr_Occurred()) {
98         goto exit;
99     }
100     return_value = PyBool_FromLong((long)_return_value);
101 
102 exit:
103     return return_value;
104 }
105 
106 PyDoc_STRVAR(_sre_ascii_tolower__doc__,
107 "ascii_tolower($module, character, /)\n"
108 "--\n"
109 "\n");
110 
111 #define _SRE_ASCII_TOLOWER_METHODDEF    \
112     {"ascii_tolower", (PyCFunction)_sre_ascii_tolower, METH_O, _sre_ascii_tolower__doc__},
113 
114 static int
115 _sre_ascii_tolower_impl(PyObject *module, int character);
116 
117 static PyObject *
_sre_ascii_tolower(PyObject * module,PyObject * arg)118 _sre_ascii_tolower(PyObject *module, PyObject *arg)
119 {
120     PyObject *return_value = NULL;
121     int character;
122     int _return_value;
123 
124     if (PyFloat_Check(arg)) {
125         PyErr_SetString(PyExc_TypeError,
126                         "integer argument expected, got float" );
127         goto exit;
128     }
129     character = _PyLong_AsInt(arg);
130     if (character == -1 && PyErr_Occurred()) {
131         goto exit;
132     }
133     _return_value = _sre_ascii_tolower_impl(module, character);
134     if ((_return_value == -1) && PyErr_Occurred()) {
135         goto exit;
136     }
137     return_value = PyLong_FromLong((long)_return_value);
138 
139 exit:
140     return return_value;
141 }
142 
143 PyDoc_STRVAR(_sre_unicode_tolower__doc__,
144 "unicode_tolower($module, character, /)\n"
145 "--\n"
146 "\n");
147 
148 #define _SRE_UNICODE_TOLOWER_METHODDEF    \
149     {"unicode_tolower", (PyCFunction)_sre_unicode_tolower, METH_O, _sre_unicode_tolower__doc__},
150 
151 static int
152 _sre_unicode_tolower_impl(PyObject *module, int character);
153 
154 static PyObject *
_sre_unicode_tolower(PyObject * module,PyObject * arg)155 _sre_unicode_tolower(PyObject *module, PyObject *arg)
156 {
157     PyObject *return_value = NULL;
158     int character;
159     int _return_value;
160 
161     if (PyFloat_Check(arg)) {
162         PyErr_SetString(PyExc_TypeError,
163                         "integer argument expected, got float" );
164         goto exit;
165     }
166     character = _PyLong_AsInt(arg);
167     if (character == -1 && PyErr_Occurred()) {
168         goto exit;
169     }
170     _return_value = _sre_unicode_tolower_impl(module, character);
171     if ((_return_value == -1) && PyErr_Occurred()) {
172         goto exit;
173     }
174     return_value = PyLong_FromLong((long)_return_value);
175 
176 exit:
177     return return_value;
178 }
179 
180 PyDoc_STRVAR(_sre_SRE_Pattern_match__doc__,
181 "match($self, /, string, pos=0, endpos=sys.maxsize)\n"
182 "--\n"
183 "\n"
184 "Matches zero or more characters at the beginning of the string.");
185 
186 #define _SRE_SRE_PATTERN_MATCH_METHODDEF    \
187     {"match", (PyCFunction)(void(*)(void))_sre_SRE_Pattern_match, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Pattern_match__doc__},
188 
189 static PyObject *
190 _sre_SRE_Pattern_match_impl(PatternObject *self, PyObject *string,
191                             Py_ssize_t pos, Py_ssize_t endpos);
192 
193 static PyObject *
_sre_SRE_Pattern_match(PatternObject * self,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)194 _sre_SRE_Pattern_match(PatternObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
195 {
196     PyObject *return_value = NULL;
197     static const char * const _keywords[] = {"string", "pos", "endpos", NULL};
198     static _PyArg_Parser _parser = {NULL, _keywords, "match", 0};
199     PyObject *argsbuf[3];
200     Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
201     PyObject *string;
202     Py_ssize_t pos = 0;
203     Py_ssize_t endpos = PY_SSIZE_T_MAX;
204 
205     args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf);
206     if (!args) {
207         goto exit;
208     }
209     string = args[0];
210     if (!noptargs) {
211         goto skip_optional_pos;
212     }
213     if (args[1]) {
214         if (PyFloat_Check(args[1])) {
215             PyErr_SetString(PyExc_TypeError,
216                             "integer argument expected, got float" );
217             goto exit;
218         }
219         {
220             Py_ssize_t ival = -1;
221             PyObject *iobj = PyNumber_Index(args[1]);
222             if (iobj != NULL) {
223                 ival = PyLong_AsSsize_t(iobj);
224                 Py_DECREF(iobj);
225             }
226             if (ival == -1 && PyErr_Occurred()) {
227                 goto exit;
228             }
229             pos = ival;
230         }
231         if (!--noptargs) {
232             goto skip_optional_pos;
233         }
234     }
235     if (PyFloat_Check(args[2])) {
236         PyErr_SetString(PyExc_TypeError,
237                         "integer argument expected, got float" );
238         goto exit;
239     }
240     {
241         Py_ssize_t ival = -1;
242         PyObject *iobj = PyNumber_Index(args[2]);
243         if (iobj != NULL) {
244             ival = PyLong_AsSsize_t(iobj);
245             Py_DECREF(iobj);
246         }
247         if (ival == -1 && PyErr_Occurred()) {
248             goto exit;
249         }
250         endpos = ival;
251     }
252 skip_optional_pos:
253     return_value = _sre_SRE_Pattern_match_impl(self, string, pos, endpos);
254 
255 exit:
256     return return_value;
257 }
258 
259 PyDoc_STRVAR(_sre_SRE_Pattern_fullmatch__doc__,
260 "fullmatch($self, /, string, pos=0, endpos=sys.maxsize)\n"
261 "--\n"
262 "\n"
263 "Matches against all of the string.");
264 
265 #define _SRE_SRE_PATTERN_FULLMATCH_METHODDEF    \
266     {"fullmatch", (PyCFunction)(void(*)(void))_sre_SRE_Pattern_fullmatch, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Pattern_fullmatch__doc__},
267 
268 static PyObject *
269 _sre_SRE_Pattern_fullmatch_impl(PatternObject *self, PyObject *string,
270                                 Py_ssize_t pos, Py_ssize_t endpos);
271 
272 static PyObject *
_sre_SRE_Pattern_fullmatch(PatternObject * self,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)273 _sre_SRE_Pattern_fullmatch(PatternObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
274 {
275     PyObject *return_value = NULL;
276     static const char * const _keywords[] = {"string", "pos", "endpos", NULL};
277     static _PyArg_Parser _parser = {NULL, _keywords, "fullmatch", 0};
278     PyObject *argsbuf[3];
279     Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
280     PyObject *string;
281     Py_ssize_t pos = 0;
282     Py_ssize_t endpos = PY_SSIZE_T_MAX;
283 
284     args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf);
285     if (!args) {
286         goto exit;
287     }
288     string = args[0];
289     if (!noptargs) {
290         goto skip_optional_pos;
291     }
292     if (args[1]) {
293         if (PyFloat_Check(args[1])) {
294             PyErr_SetString(PyExc_TypeError,
295                             "integer argument expected, got float" );
296             goto exit;
297         }
298         {
299             Py_ssize_t ival = -1;
300             PyObject *iobj = PyNumber_Index(args[1]);
301             if (iobj != NULL) {
302                 ival = PyLong_AsSsize_t(iobj);
303                 Py_DECREF(iobj);
304             }
305             if (ival == -1 && PyErr_Occurred()) {
306                 goto exit;
307             }
308             pos = ival;
309         }
310         if (!--noptargs) {
311             goto skip_optional_pos;
312         }
313     }
314     if (PyFloat_Check(args[2])) {
315         PyErr_SetString(PyExc_TypeError,
316                         "integer argument expected, got float" );
317         goto exit;
318     }
319     {
320         Py_ssize_t ival = -1;
321         PyObject *iobj = PyNumber_Index(args[2]);
322         if (iobj != NULL) {
323             ival = PyLong_AsSsize_t(iobj);
324             Py_DECREF(iobj);
325         }
326         if (ival == -1 && PyErr_Occurred()) {
327             goto exit;
328         }
329         endpos = ival;
330     }
331 skip_optional_pos:
332     return_value = _sre_SRE_Pattern_fullmatch_impl(self, string, pos, endpos);
333 
334 exit:
335     return return_value;
336 }
337 
338 PyDoc_STRVAR(_sre_SRE_Pattern_search__doc__,
339 "search($self, /, string, pos=0, endpos=sys.maxsize)\n"
340 "--\n"
341 "\n"
342 "Scan through string looking for a match, and return a corresponding match object instance.\n"
343 "\n"
344 "Return None if no position in the string matches.");
345 
346 #define _SRE_SRE_PATTERN_SEARCH_METHODDEF    \
347     {"search", (PyCFunction)(void(*)(void))_sre_SRE_Pattern_search, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Pattern_search__doc__},
348 
349 static PyObject *
350 _sre_SRE_Pattern_search_impl(PatternObject *self, PyObject *string,
351                              Py_ssize_t pos, Py_ssize_t endpos);
352 
353 static PyObject *
_sre_SRE_Pattern_search(PatternObject * self,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)354 _sre_SRE_Pattern_search(PatternObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
355 {
356     PyObject *return_value = NULL;
357     static const char * const _keywords[] = {"string", "pos", "endpos", NULL};
358     static _PyArg_Parser _parser = {NULL, _keywords, "search", 0};
359     PyObject *argsbuf[3];
360     Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
361     PyObject *string;
362     Py_ssize_t pos = 0;
363     Py_ssize_t endpos = PY_SSIZE_T_MAX;
364 
365     args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf);
366     if (!args) {
367         goto exit;
368     }
369     string = args[0];
370     if (!noptargs) {
371         goto skip_optional_pos;
372     }
373     if (args[1]) {
374         if (PyFloat_Check(args[1])) {
375             PyErr_SetString(PyExc_TypeError,
376                             "integer argument expected, got float" );
377             goto exit;
378         }
379         {
380             Py_ssize_t ival = -1;
381             PyObject *iobj = PyNumber_Index(args[1]);
382             if (iobj != NULL) {
383                 ival = PyLong_AsSsize_t(iobj);
384                 Py_DECREF(iobj);
385             }
386             if (ival == -1 && PyErr_Occurred()) {
387                 goto exit;
388             }
389             pos = ival;
390         }
391         if (!--noptargs) {
392             goto skip_optional_pos;
393         }
394     }
395     if (PyFloat_Check(args[2])) {
396         PyErr_SetString(PyExc_TypeError,
397                         "integer argument expected, got float" );
398         goto exit;
399     }
400     {
401         Py_ssize_t ival = -1;
402         PyObject *iobj = PyNumber_Index(args[2]);
403         if (iobj != NULL) {
404             ival = PyLong_AsSsize_t(iobj);
405             Py_DECREF(iobj);
406         }
407         if (ival == -1 && PyErr_Occurred()) {
408             goto exit;
409         }
410         endpos = ival;
411     }
412 skip_optional_pos:
413     return_value = _sre_SRE_Pattern_search_impl(self, string, pos, endpos);
414 
415 exit:
416     return return_value;
417 }
418 
419 PyDoc_STRVAR(_sre_SRE_Pattern_findall__doc__,
420 "findall($self, /, string, pos=0, endpos=sys.maxsize)\n"
421 "--\n"
422 "\n"
423 "Return a list of all non-overlapping matches of pattern in string.");
424 
425 #define _SRE_SRE_PATTERN_FINDALL_METHODDEF    \
426     {"findall", (PyCFunction)(void(*)(void))_sre_SRE_Pattern_findall, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Pattern_findall__doc__},
427 
428 static PyObject *
429 _sre_SRE_Pattern_findall_impl(PatternObject *self, PyObject *string,
430                               Py_ssize_t pos, Py_ssize_t endpos);
431 
432 static PyObject *
_sre_SRE_Pattern_findall(PatternObject * self,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)433 _sre_SRE_Pattern_findall(PatternObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
434 {
435     PyObject *return_value = NULL;
436     static const char * const _keywords[] = {"string", "pos", "endpos", NULL};
437     static _PyArg_Parser _parser = {NULL, _keywords, "findall", 0};
438     PyObject *argsbuf[3];
439     Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
440     PyObject *string;
441     Py_ssize_t pos = 0;
442     Py_ssize_t endpos = PY_SSIZE_T_MAX;
443 
444     args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf);
445     if (!args) {
446         goto exit;
447     }
448     string = args[0];
449     if (!noptargs) {
450         goto skip_optional_pos;
451     }
452     if (args[1]) {
453         if (PyFloat_Check(args[1])) {
454             PyErr_SetString(PyExc_TypeError,
455                             "integer argument expected, got float" );
456             goto exit;
457         }
458         {
459             Py_ssize_t ival = -1;
460             PyObject *iobj = PyNumber_Index(args[1]);
461             if (iobj != NULL) {
462                 ival = PyLong_AsSsize_t(iobj);
463                 Py_DECREF(iobj);
464             }
465             if (ival == -1 && PyErr_Occurred()) {
466                 goto exit;
467             }
468             pos = ival;
469         }
470         if (!--noptargs) {
471             goto skip_optional_pos;
472         }
473     }
474     if (PyFloat_Check(args[2])) {
475         PyErr_SetString(PyExc_TypeError,
476                         "integer argument expected, got float" );
477         goto exit;
478     }
479     {
480         Py_ssize_t ival = -1;
481         PyObject *iobj = PyNumber_Index(args[2]);
482         if (iobj != NULL) {
483             ival = PyLong_AsSsize_t(iobj);
484             Py_DECREF(iobj);
485         }
486         if (ival == -1 && PyErr_Occurred()) {
487             goto exit;
488         }
489         endpos = ival;
490     }
491 skip_optional_pos:
492     return_value = _sre_SRE_Pattern_findall_impl(self, string, pos, endpos);
493 
494 exit:
495     return return_value;
496 }
497 
498 PyDoc_STRVAR(_sre_SRE_Pattern_finditer__doc__,
499 "finditer($self, /, string, pos=0, endpos=sys.maxsize)\n"
500 "--\n"
501 "\n"
502 "Return an iterator over all non-overlapping matches for the RE pattern in string.\n"
503 "\n"
504 "For each match, the iterator returns a match object.");
505 
506 #define _SRE_SRE_PATTERN_FINDITER_METHODDEF    \
507     {"finditer", (PyCFunction)(void(*)(void))_sre_SRE_Pattern_finditer, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Pattern_finditer__doc__},
508 
509 static PyObject *
510 _sre_SRE_Pattern_finditer_impl(PatternObject *self, PyObject *string,
511                                Py_ssize_t pos, Py_ssize_t endpos);
512 
513 static PyObject *
_sre_SRE_Pattern_finditer(PatternObject * self,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)514 _sre_SRE_Pattern_finditer(PatternObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
515 {
516     PyObject *return_value = NULL;
517     static const char * const _keywords[] = {"string", "pos", "endpos", NULL};
518     static _PyArg_Parser _parser = {NULL, _keywords, "finditer", 0};
519     PyObject *argsbuf[3];
520     Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
521     PyObject *string;
522     Py_ssize_t pos = 0;
523     Py_ssize_t endpos = PY_SSIZE_T_MAX;
524 
525     args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf);
526     if (!args) {
527         goto exit;
528     }
529     string = args[0];
530     if (!noptargs) {
531         goto skip_optional_pos;
532     }
533     if (args[1]) {
534         if (PyFloat_Check(args[1])) {
535             PyErr_SetString(PyExc_TypeError,
536                             "integer argument expected, got float" );
537             goto exit;
538         }
539         {
540             Py_ssize_t ival = -1;
541             PyObject *iobj = PyNumber_Index(args[1]);
542             if (iobj != NULL) {
543                 ival = PyLong_AsSsize_t(iobj);
544                 Py_DECREF(iobj);
545             }
546             if (ival == -1 && PyErr_Occurred()) {
547                 goto exit;
548             }
549             pos = ival;
550         }
551         if (!--noptargs) {
552             goto skip_optional_pos;
553         }
554     }
555     if (PyFloat_Check(args[2])) {
556         PyErr_SetString(PyExc_TypeError,
557                         "integer argument expected, got float" );
558         goto exit;
559     }
560     {
561         Py_ssize_t ival = -1;
562         PyObject *iobj = PyNumber_Index(args[2]);
563         if (iobj != NULL) {
564             ival = PyLong_AsSsize_t(iobj);
565             Py_DECREF(iobj);
566         }
567         if (ival == -1 && PyErr_Occurred()) {
568             goto exit;
569         }
570         endpos = ival;
571     }
572 skip_optional_pos:
573     return_value = _sre_SRE_Pattern_finditer_impl(self, string, pos, endpos);
574 
575 exit:
576     return return_value;
577 }
578 
579 PyDoc_STRVAR(_sre_SRE_Pattern_scanner__doc__,
580 "scanner($self, /, string, pos=0, endpos=sys.maxsize)\n"
581 "--\n"
582 "\n");
583 
584 #define _SRE_SRE_PATTERN_SCANNER_METHODDEF    \
585     {"scanner", (PyCFunction)(void(*)(void))_sre_SRE_Pattern_scanner, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Pattern_scanner__doc__},
586 
587 static PyObject *
588 _sre_SRE_Pattern_scanner_impl(PatternObject *self, PyObject *string,
589                               Py_ssize_t pos, Py_ssize_t endpos);
590 
591 static PyObject *
_sre_SRE_Pattern_scanner(PatternObject * self,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)592 _sre_SRE_Pattern_scanner(PatternObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
593 {
594     PyObject *return_value = NULL;
595     static const char * const _keywords[] = {"string", "pos", "endpos", NULL};
596     static _PyArg_Parser _parser = {NULL, _keywords, "scanner", 0};
597     PyObject *argsbuf[3];
598     Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
599     PyObject *string;
600     Py_ssize_t pos = 0;
601     Py_ssize_t endpos = PY_SSIZE_T_MAX;
602 
603     args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf);
604     if (!args) {
605         goto exit;
606     }
607     string = args[0];
608     if (!noptargs) {
609         goto skip_optional_pos;
610     }
611     if (args[1]) {
612         if (PyFloat_Check(args[1])) {
613             PyErr_SetString(PyExc_TypeError,
614                             "integer argument expected, got float" );
615             goto exit;
616         }
617         {
618             Py_ssize_t ival = -1;
619             PyObject *iobj = PyNumber_Index(args[1]);
620             if (iobj != NULL) {
621                 ival = PyLong_AsSsize_t(iobj);
622                 Py_DECREF(iobj);
623             }
624             if (ival == -1 && PyErr_Occurred()) {
625                 goto exit;
626             }
627             pos = ival;
628         }
629         if (!--noptargs) {
630             goto skip_optional_pos;
631         }
632     }
633     if (PyFloat_Check(args[2])) {
634         PyErr_SetString(PyExc_TypeError,
635                         "integer argument expected, got float" );
636         goto exit;
637     }
638     {
639         Py_ssize_t ival = -1;
640         PyObject *iobj = PyNumber_Index(args[2]);
641         if (iobj != NULL) {
642             ival = PyLong_AsSsize_t(iobj);
643             Py_DECREF(iobj);
644         }
645         if (ival == -1 && PyErr_Occurred()) {
646             goto exit;
647         }
648         endpos = ival;
649     }
650 skip_optional_pos:
651     return_value = _sre_SRE_Pattern_scanner_impl(self, string, pos, endpos);
652 
653 exit:
654     return return_value;
655 }
656 
657 PyDoc_STRVAR(_sre_SRE_Pattern_split__doc__,
658 "split($self, /, string, maxsplit=0)\n"
659 "--\n"
660 "\n"
661 "Split string by the occurrences of pattern.");
662 
663 #define _SRE_SRE_PATTERN_SPLIT_METHODDEF    \
664     {"split", (PyCFunction)(void(*)(void))_sre_SRE_Pattern_split, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Pattern_split__doc__},
665 
666 static PyObject *
667 _sre_SRE_Pattern_split_impl(PatternObject *self, PyObject *string,
668                             Py_ssize_t maxsplit);
669 
670 static PyObject *
_sre_SRE_Pattern_split(PatternObject * self,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)671 _sre_SRE_Pattern_split(PatternObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
672 {
673     PyObject *return_value = NULL;
674     static const char * const _keywords[] = {"string", "maxsplit", NULL};
675     static _PyArg_Parser _parser = {NULL, _keywords, "split", 0};
676     PyObject *argsbuf[2];
677     Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
678     PyObject *string;
679     Py_ssize_t maxsplit = 0;
680 
681     args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf);
682     if (!args) {
683         goto exit;
684     }
685     string = args[0];
686     if (!noptargs) {
687         goto skip_optional_pos;
688     }
689     if (PyFloat_Check(args[1])) {
690         PyErr_SetString(PyExc_TypeError,
691                         "integer argument expected, got float" );
692         goto exit;
693     }
694     {
695         Py_ssize_t ival = -1;
696         PyObject *iobj = PyNumber_Index(args[1]);
697         if (iobj != NULL) {
698             ival = PyLong_AsSsize_t(iobj);
699             Py_DECREF(iobj);
700         }
701         if (ival == -1 && PyErr_Occurred()) {
702             goto exit;
703         }
704         maxsplit = ival;
705     }
706 skip_optional_pos:
707     return_value = _sre_SRE_Pattern_split_impl(self, string, maxsplit);
708 
709 exit:
710     return return_value;
711 }
712 
713 PyDoc_STRVAR(_sre_SRE_Pattern_sub__doc__,
714 "sub($self, /, repl, string, count=0)\n"
715 "--\n"
716 "\n"
717 "Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.");
718 
719 #define _SRE_SRE_PATTERN_SUB_METHODDEF    \
720     {"sub", (PyCFunction)(void(*)(void))_sre_SRE_Pattern_sub, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Pattern_sub__doc__},
721 
722 static PyObject *
723 _sre_SRE_Pattern_sub_impl(PatternObject *self, PyObject *repl,
724                           PyObject *string, Py_ssize_t count);
725 
726 static PyObject *
_sre_SRE_Pattern_sub(PatternObject * self,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)727 _sre_SRE_Pattern_sub(PatternObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
728 {
729     PyObject *return_value = NULL;
730     static const char * const _keywords[] = {"repl", "string", "count", NULL};
731     static _PyArg_Parser _parser = {NULL, _keywords, "sub", 0};
732     PyObject *argsbuf[3];
733     Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 2;
734     PyObject *repl;
735     PyObject *string;
736     Py_ssize_t count = 0;
737 
738     args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf);
739     if (!args) {
740         goto exit;
741     }
742     repl = args[0];
743     string = args[1];
744     if (!noptargs) {
745         goto skip_optional_pos;
746     }
747     if (PyFloat_Check(args[2])) {
748         PyErr_SetString(PyExc_TypeError,
749                         "integer argument expected, got float" );
750         goto exit;
751     }
752     {
753         Py_ssize_t ival = -1;
754         PyObject *iobj = PyNumber_Index(args[2]);
755         if (iobj != NULL) {
756             ival = PyLong_AsSsize_t(iobj);
757             Py_DECREF(iobj);
758         }
759         if (ival == -1 && PyErr_Occurred()) {
760             goto exit;
761         }
762         count = ival;
763     }
764 skip_optional_pos:
765     return_value = _sre_SRE_Pattern_sub_impl(self, repl, string, count);
766 
767 exit:
768     return return_value;
769 }
770 
771 PyDoc_STRVAR(_sre_SRE_Pattern_subn__doc__,
772 "subn($self, /, repl, string, count=0)\n"
773 "--\n"
774 "\n"
775 "Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl.");
776 
777 #define _SRE_SRE_PATTERN_SUBN_METHODDEF    \
778     {"subn", (PyCFunction)(void(*)(void))_sre_SRE_Pattern_subn, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Pattern_subn__doc__},
779 
780 static PyObject *
781 _sre_SRE_Pattern_subn_impl(PatternObject *self, PyObject *repl,
782                            PyObject *string, Py_ssize_t count);
783 
784 static PyObject *
_sre_SRE_Pattern_subn(PatternObject * self,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)785 _sre_SRE_Pattern_subn(PatternObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
786 {
787     PyObject *return_value = NULL;
788     static const char * const _keywords[] = {"repl", "string", "count", NULL};
789     static _PyArg_Parser _parser = {NULL, _keywords, "subn", 0};
790     PyObject *argsbuf[3];
791     Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 2;
792     PyObject *repl;
793     PyObject *string;
794     Py_ssize_t count = 0;
795 
796     args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf);
797     if (!args) {
798         goto exit;
799     }
800     repl = args[0];
801     string = args[1];
802     if (!noptargs) {
803         goto skip_optional_pos;
804     }
805     if (PyFloat_Check(args[2])) {
806         PyErr_SetString(PyExc_TypeError,
807                         "integer argument expected, got float" );
808         goto exit;
809     }
810     {
811         Py_ssize_t ival = -1;
812         PyObject *iobj = PyNumber_Index(args[2]);
813         if (iobj != NULL) {
814             ival = PyLong_AsSsize_t(iobj);
815             Py_DECREF(iobj);
816         }
817         if (ival == -1 && PyErr_Occurred()) {
818             goto exit;
819         }
820         count = ival;
821     }
822 skip_optional_pos:
823     return_value = _sre_SRE_Pattern_subn_impl(self, repl, string, count);
824 
825 exit:
826     return return_value;
827 }
828 
829 PyDoc_STRVAR(_sre_SRE_Pattern___copy____doc__,
830 "__copy__($self, /)\n"
831 "--\n"
832 "\n");
833 
834 #define _SRE_SRE_PATTERN___COPY___METHODDEF    \
835     {"__copy__", (PyCFunction)_sre_SRE_Pattern___copy__, METH_NOARGS, _sre_SRE_Pattern___copy____doc__},
836 
837 static PyObject *
838 _sre_SRE_Pattern___copy___impl(PatternObject *self);
839 
840 static PyObject *
_sre_SRE_Pattern___copy__(PatternObject * self,PyObject * Py_UNUSED (ignored))841 _sre_SRE_Pattern___copy__(PatternObject *self, PyObject *Py_UNUSED(ignored))
842 {
843     return _sre_SRE_Pattern___copy___impl(self);
844 }
845 
846 PyDoc_STRVAR(_sre_SRE_Pattern___deepcopy____doc__,
847 "__deepcopy__($self, memo, /)\n"
848 "--\n"
849 "\n");
850 
851 #define _SRE_SRE_PATTERN___DEEPCOPY___METHODDEF    \
852     {"__deepcopy__", (PyCFunction)_sre_SRE_Pattern___deepcopy__, METH_O, _sre_SRE_Pattern___deepcopy____doc__},
853 
854 PyDoc_STRVAR(_sre_compile__doc__,
855 "compile($module, /, pattern, flags, code, groups, groupindex,\n"
856 "        indexgroup)\n"
857 "--\n"
858 "\n");
859 
860 #define _SRE_COMPILE_METHODDEF    \
861     {"compile", (PyCFunction)(void(*)(void))_sre_compile, METH_FASTCALL|METH_KEYWORDS, _sre_compile__doc__},
862 
863 static PyObject *
864 _sre_compile_impl(PyObject *module, PyObject *pattern, int flags,
865                   PyObject *code, Py_ssize_t groups, PyObject *groupindex,
866                   PyObject *indexgroup);
867 
868 static PyObject *
_sre_compile(PyObject * module,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)869 _sre_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
870 {
871     PyObject *return_value = NULL;
872     static const char * const _keywords[] = {"pattern", "flags", "code", "groups", "groupindex", "indexgroup", NULL};
873     static _PyArg_Parser _parser = {NULL, _keywords, "compile", 0};
874     PyObject *argsbuf[6];
875     PyObject *pattern;
876     int flags;
877     PyObject *code;
878     Py_ssize_t groups;
879     PyObject *groupindex;
880     PyObject *indexgroup;
881 
882     args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 6, 6, 0, argsbuf);
883     if (!args) {
884         goto exit;
885     }
886     pattern = args[0];
887     if (PyFloat_Check(args[1])) {
888         PyErr_SetString(PyExc_TypeError,
889                         "integer argument expected, got float" );
890         goto exit;
891     }
892     flags = _PyLong_AsInt(args[1]);
893     if (flags == -1 && PyErr_Occurred()) {
894         goto exit;
895     }
896     if (!PyList_Check(args[2])) {
897         _PyArg_BadArgument("compile", "argument 'code'", "list", args[2]);
898         goto exit;
899     }
900     code = args[2];
901     if (PyFloat_Check(args[3])) {
902         PyErr_SetString(PyExc_TypeError,
903                         "integer argument expected, got float" );
904         goto exit;
905     }
906     {
907         Py_ssize_t ival = -1;
908         PyObject *iobj = PyNumber_Index(args[3]);
909         if (iobj != NULL) {
910             ival = PyLong_AsSsize_t(iobj);
911             Py_DECREF(iobj);
912         }
913         if (ival == -1 && PyErr_Occurred()) {
914             goto exit;
915         }
916         groups = ival;
917     }
918     if (!PyDict_Check(args[4])) {
919         _PyArg_BadArgument("compile", "argument 'groupindex'", "dict", args[4]);
920         goto exit;
921     }
922     groupindex = args[4];
923     if (!PyTuple_Check(args[5])) {
924         _PyArg_BadArgument("compile", "argument 'indexgroup'", "tuple", args[5]);
925         goto exit;
926     }
927     indexgroup = args[5];
928     return_value = _sre_compile_impl(module, pattern, flags, code, groups, groupindex, indexgroup);
929 
930 exit:
931     return return_value;
932 }
933 
934 PyDoc_STRVAR(_sre_SRE_Match_expand__doc__,
935 "expand($self, /, template)\n"
936 "--\n"
937 "\n"
938 "Return the string obtained by doing backslash substitution on the string template, as done by the sub() method.");
939 
940 #define _SRE_SRE_MATCH_EXPAND_METHODDEF    \
941     {"expand", (PyCFunction)(void(*)(void))_sre_SRE_Match_expand, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Match_expand__doc__},
942 
943 static PyObject *
944 _sre_SRE_Match_expand_impl(MatchObject *self, PyObject *template);
945 
946 static PyObject *
_sre_SRE_Match_expand(MatchObject * self,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)947 _sre_SRE_Match_expand(MatchObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
948 {
949     PyObject *return_value = NULL;
950     static const char * const _keywords[] = {"template", NULL};
951     static _PyArg_Parser _parser = {NULL, _keywords, "expand", 0};
952     PyObject *argsbuf[1];
953     PyObject *template;
954 
955     args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
956     if (!args) {
957         goto exit;
958     }
959     template = args[0];
960     return_value = _sre_SRE_Match_expand_impl(self, template);
961 
962 exit:
963     return return_value;
964 }
965 
966 PyDoc_STRVAR(_sre_SRE_Match_groups__doc__,
967 "groups($self, /, default=None)\n"
968 "--\n"
969 "\n"
970 "Return a tuple containing all the subgroups of the match, from 1.\n"
971 "\n"
972 "  default\n"
973 "    Is used for groups that did not participate in the match.");
974 
975 #define _SRE_SRE_MATCH_GROUPS_METHODDEF    \
976     {"groups", (PyCFunction)(void(*)(void))_sre_SRE_Match_groups, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Match_groups__doc__},
977 
978 static PyObject *
979 _sre_SRE_Match_groups_impl(MatchObject *self, PyObject *default_value);
980 
981 static PyObject *
_sre_SRE_Match_groups(MatchObject * self,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)982 _sre_SRE_Match_groups(MatchObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
983 {
984     PyObject *return_value = NULL;
985     static const char * const _keywords[] = {"default", NULL};
986     static _PyArg_Parser _parser = {NULL, _keywords, "groups", 0};
987     PyObject *argsbuf[1];
988     Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
989     PyObject *default_value = Py_None;
990 
991     args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf);
992     if (!args) {
993         goto exit;
994     }
995     if (!noptargs) {
996         goto skip_optional_pos;
997     }
998     default_value = args[0];
999 skip_optional_pos:
1000     return_value = _sre_SRE_Match_groups_impl(self, default_value);
1001 
1002 exit:
1003     return return_value;
1004 }
1005 
1006 PyDoc_STRVAR(_sre_SRE_Match_groupdict__doc__,
1007 "groupdict($self, /, default=None)\n"
1008 "--\n"
1009 "\n"
1010 "Return a dictionary containing all the named subgroups of the match, keyed by the subgroup name.\n"
1011 "\n"
1012 "  default\n"
1013 "    Is used for groups that did not participate in the match.");
1014 
1015 #define _SRE_SRE_MATCH_GROUPDICT_METHODDEF    \
1016     {"groupdict", (PyCFunction)(void(*)(void))_sre_SRE_Match_groupdict, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Match_groupdict__doc__},
1017 
1018 static PyObject *
1019 _sre_SRE_Match_groupdict_impl(MatchObject *self, PyObject *default_value);
1020 
1021 static PyObject *
_sre_SRE_Match_groupdict(MatchObject * self,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)1022 _sre_SRE_Match_groupdict(MatchObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1023 {
1024     PyObject *return_value = NULL;
1025     static const char * const _keywords[] = {"default", NULL};
1026     static _PyArg_Parser _parser = {NULL, _keywords, "groupdict", 0};
1027     PyObject *argsbuf[1];
1028     Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
1029     PyObject *default_value = Py_None;
1030 
1031     args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf);
1032     if (!args) {
1033         goto exit;
1034     }
1035     if (!noptargs) {
1036         goto skip_optional_pos;
1037     }
1038     default_value = args[0];
1039 skip_optional_pos:
1040     return_value = _sre_SRE_Match_groupdict_impl(self, default_value);
1041 
1042 exit:
1043     return return_value;
1044 }
1045 
1046 PyDoc_STRVAR(_sre_SRE_Match_start__doc__,
1047 "start($self, group=0, /)\n"
1048 "--\n"
1049 "\n"
1050 "Return index of the start of the substring matched by group.");
1051 
1052 #define _SRE_SRE_MATCH_START_METHODDEF    \
1053     {"start", (PyCFunction)(void(*)(void))_sre_SRE_Match_start, METH_FASTCALL, _sre_SRE_Match_start__doc__},
1054 
1055 static Py_ssize_t
1056 _sre_SRE_Match_start_impl(MatchObject *self, PyObject *group);
1057 
1058 static PyObject *
_sre_SRE_Match_start(MatchObject * self,PyObject * const * args,Py_ssize_t nargs)1059 _sre_SRE_Match_start(MatchObject *self, PyObject *const *args, Py_ssize_t nargs)
1060 {
1061     PyObject *return_value = NULL;
1062     PyObject *group = NULL;
1063     Py_ssize_t _return_value;
1064 
1065     if (!_PyArg_CheckPositional("start", nargs, 0, 1)) {
1066         goto exit;
1067     }
1068     if (nargs < 1) {
1069         goto skip_optional;
1070     }
1071     group = args[0];
1072 skip_optional:
1073     _return_value = _sre_SRE_Match_start_impl(self, group);
1074     if ((_return_value == -1) && PyErr_Occurred()) {
1075         goto exit;
1076     }
1077     return_value = PyLong_FromSsize_t(_return_value);
1078 
1079 exit:
1080     return return_value;
1081 }
1082 
1083 PyDoc_STRVAR(_sre_SRE_Match_end__doc__,
1084 "end($self, group=0, /)\n"
1085 "--\n"
1086 "\n"
1087 "Return index of the end of the substring matched by group.");
1088 
1089 #define _SRE_SRE_MATCH_END_METHODDEF    \
1090     {"end", (PyCFunction)(void(*)(void))_sre_SRE_Match_end, METH_FASTCALL, _sre_SRE_Match_end__doc__},
1091 
1092 static Py_ssize_t
1093 _sre_SRE_Match_end_impl(MatchObject *self, PyObject *group);
1094 
1095 static PyObject *
_sre_SRE_Match_end(MatchObject * self,PyObject * const * args,Py_ssize_t nargs)1096 _sre_SRE_Match_end(MatchObject *self, PyObject *const *args, Py_ssize_t nargs)
1097 {
1098     PyObject *return_value = NULL;
1099     PyObject *group = NULL;
1100     Py_ssize_t _return_value;
1101 
1102     if (!_PyArg_CheckPositional("end", nargs, 0, 1)) {
1103         goto exit;
1104     }
1105     if (nargs < 1) {
1106         goto skip_optional;
1107     }
1108     group = args[0];
1109 skip_optional:
1110     _return_value = _sre_SRE_Match_end_impl(self, group);
1111     if ((_return_value == -1) && PyErr_Occurred()) {
1112         goto exit;
1113     }
1114     return_value = PyLong_FromSsize_t(_return_value);
1115 
1116 exit:
1117     return return_value;
1118 }
1119 
1120 PyDoc_STRVAR(_sre_SRE_Match_span__doc__,
1121 "span($self, group=0, /)\n"
1122 "--\n"
1123 "\n"
1124 "For match object m, return the 2-tuple (m.start(group), m.end(group)).");
1125 
1126 #define _SRE_SRE_MATCH_SPAN_METHODDEF    \
1127     {"span", (PyCFunction)(void(*)(void))_sre_SRE_Match_span, METH_FASTCALL, _sre_SRE_Match_span__doc__},
1128 
1129 static PyObject *
1130 _sre_SRE_Match_span_impl(MatchObject *self, PyObject *group);
1131 
1132 static PyObject *
_sre_SRE_Match_span(MatchObject * self,PyObject * const * args,Py_ssize_t nargs)1133 _sre_SRE_Match_span(MatchObject *self, PyObject *const *args, Py_ssize_t nargs)
1134 {
1135     PyObject *return_value = NULL;
1136     PyObject *group = NULL;
1137 
1138     if (!_PyArg_CheckPositional("span", nargs, 0, 1)) {
1139         goto exit;
1140     }
1141     if (nargs < 1) {
1142         goto skip_optional;
1143     }
1144     group = args[0];
1145 skip_optional:
1146     return_value = _sre_SRE_Match_span_impl(self, group);
1147 
1148 exit:
1149     return return_value;
1150 }
1151 
1152 PyDoc_STRVAR(_sre_SRE_Match___copy____doc__,
1153 "__copy__($self, /)\n"
1154 "--\n"
1155 "\n");
1156 
1157 #define _SRE_SRE_MATCH___COPY___METHODDEF    \
1158     {"__copy__", (PyCFunction)_sre_SRE_Match___copy__, METH_NOARGS, _sre_SRE_Match___copy____doc__},
1159 
1160 static PyObject *
1161 _sre_SRE_Match___copy___impl(MatchObject *self);
1162 
1163 static PyObject *
_sre_SRE_Match___copy__(MatchObject * self,PyObject * Py_UNUSED (ignored))1164 _sre_SRE_Match___copy__(MatchObject *self, PyObject *Py_UNUSED(ignored))
1165 {
1166     return _sre_SRE_Match___copy___impl(self);
1167 }
1168 
1169 PyDoc_STRVAR(_sre_SRE_Match___deepcopy____doc__,
1170 "__deepcopy__($self, memo, /)\n"
1171 "--\n"
1172 "\n");
1173 
1174 #define _SRE_SRE_MATCH___DEEPCOPY___METHODDEF    \
1175     {"__deepcopy__", (PyCFunction)_sre_SRE_Match___deepcopy__, METH_O, _sre_SRE_Match___deepcopy____doc__},
1176 
1177 PyDoc_STRVAR(_sre_SRE_Scanner_match__doc__,
1178 "match($self, /)\n"
1179 "--\n"
1180 "\n");
1181 
1182 #define _SRE_SRE_SCANNER_MATCH_METHODDEF    \
1183     {"match", (PyCFunction)_sre_SRE_Scanner_match, METH_NOARGS, _sre_SRE_Scanner_match__doc__},
1184 
1185 static PyObject *
1186 _sre_SRE_Scanner_match_impl(ScannerObject *self);
1187 
1188 static PyObject *
_sre_SRE_Scanner_match(ScannerObject * self,PyObject * Py_UNUSED (ignored))1189 _sre_SRE_Scanner_match(ScannerObject *self, PyObject *Py_UNUSED(ignored))
1190 {
1191     return _sre_SRE_Scanner_match_impl(self);
1192 }
1193 
1194 PyDoc_STRVAR(_sre_SRE_Scanner_search__doc__,
1195 "search($self, /)\n"
1196 "--\n"
1197 "\n");
1198 
1199 #define _SRE_SRE_SCANNER_SEARCH_METHODDEF    \
1200     {"search", (PyCFunction)_sre_SRE_Scanner_search, METH_NOARGS, _sre_SRE_Scanner_search__doc__},
1201 
1202 static PyObject *
1203 _sre_SRE_Scanner_search_impl(ScannerObject *self);
1204 
1205 static PyObject *
_sre_SRE_Scanner_search(ScannerObject * self,PyObject * Py_UNUSED (ignored))1206 _sre_SRE_Scanner_search(ScannerObject *self, PyObject *Py_UNUSED(ignored))
1207 {
1208     return _sre_SRE_Scanner_search_impl(self);
1209 }
1210 /*[clinic end generated code: output=1adeddce58ae284c input=a9049054013a1b77]*/
1211