@@ -29,34 +29,59 @@ _sre_getcodesize(PyObject *module, PyObject *Py_UNUSED(ignored))
2929 return return_value ;
3030}
3131
32- PyDoc_STRVAR (_sre_getlower__doc__ ,
33- "getlower ($module, character, flags , /)\n"
32+ PyDoc_STRVAR (_sre_ascii_tolower__doc__ ,
33+ "ascii_tolower ($module, character, /)\n"
3434"--\n"
3535"\n" );
3636
37- #define _SRE_GETLOWER_METHODDEF \
38- {"getlower ", (PyCFunction)_sre_getlower, METH_FASTCALL, _sre_getlower__doc__ },
37+ #define _SRE_ASCII_TOLOWER_METHODDEF \
38+ {"ascii_tolower ", (PyCFunction)_sre_ascii_tolower, METH_O, _sre_ascii_tolower__doc__ },
3939
4040static int
41- _sre_getlower_impl (PyObject * module , int character , int flags );
41+ _sre_ascii_tolower_impl (PyObject * module , int character );
4242
4343static PyObject *
44- _sre_getlower (PyObject * module , PyObject * * args , Py_ssize_t nargs , PyObject * kwnames )
44+ _sre_ascii_tolower (PyObject * module , PyObject * arg )
4545{
4646 PyObject * return_value = NULL ;
4747 int character ;
48- int flags ;
4948 int _return_value ;
5049
51- if (!_PyArg_ParseStack (args , nargs , "ii:getlower" ,
52- & character , & flags )) {
50+ if (!PyArg_Parse (arg , "i:ascii_tolower" , & character )) {
51+ goto exit ;
52+ }
53+ _return_value = _sre_ascii_tolower_impl (module , character );
54+ if ((_return_value == -1 ) && PyErr_Occurred ()) {
5355 goto exit ;
5456 }
57+ return_value = PyLong_FromLong ((long )_return_value );
58+
59+ exit :
60+ return return_value ;
61+ }
62+
63+ PyDoc_STRVAR (_sre_unicode_tolower__doc__ ,
64+ "unicode_tolower($module, character, /)\n"
65+ "--\n"
66+ "\n" );
67+
68+ #define _SRE_UNICODE_TOLOWER_METHODDEF \
69+ {"unicode_tolower", (PyCFunction)_sre_unicode_tolower, METH_O, _sre_unicode_tolower__doc__},
70+
71+ static int
72+ _sre_unicode_tolower_impl (PyObject * module , int character );
73+
74+ static PyObject *
75+ _sre_unicode_tolower (PyObject * module , PyObject * arg )
76+ {
77+ PyObject * return_value = NULL ;
78+ int character ;
79+ int _return_value ;
5580
56- if (!_PyArg_NoStackKeywords ( "getlower " , kwnames )) {
81+ if (!PyArg_Parse ( arg , "i:unicode_tolower " , & character )) {
5782 goto exit ;
5883 }
59- _return_value = _sre_getlower_impl (module , character , flags );
84+ _return_value = _sre_unicode_tolower_impl (module , character );
6085 if ((_return_value == -1 ) && PyErr_Occurred ()) {
6186 goto exit ;
6287 }
@@ -690,4 +715,4 @@ _sre_SRE_Scanner_search(ScannerObject *self, PyObject *Py_UNUSED(ignored))
690715{
691716 return _sre_SRE_Scanner_search_impl (self );
692717}
693- /*[clinic end generated code: output=e6dab3ba8864da9e input=a9049054013a1b77]*/
718+ /*[clinic end generated code: output=811e67d7f8f5052e input=a9049054013a1b77]*/
0 commit comments