@@ -89,15 +89,13 @@ a ValueError. Other possible values are 'ignore', 'replace' and\n\
8989codecs.register_error that can handle ValueErrors." );
9090
9191static PyObject *
92- codec_encode (PyObject * self , PyObject * args , PyObject * kwargs )
92+ codec_encode (PyObject * self , PyObject * args )
9393{
94- static char * kwlist [] = {"obj" , "encoding" , "errors" , NULL };
9594 const char * encoding = NULL ;
9695 const char * errors = NULL ;
9796 PyObject * v ;
9897
99- if (!PyArg_ParseTupleAndKeywords (args , kwargs , "O|ss:encode" , kwlist ,
100- & v , & encoding , & errors ))
98+ if (!PyArg_ParseTuple (args , "O|ss:encode" , & v , & encoding , & errors ))
10199 return NULL ;
102100
103101 if (encoding == NULL )
@@ -118,15 +116,13 @@ as well as any other name registered with codecs.register_error that is\n\
118116able to handle ValueErrors." );
119117
120118static PyObject *
121- codec_decode (PyObject * self , PyObject * args , PyObject * kwargs )
119+ codec_decode (PyObject * self , PyObject * args )
122120{
123- static char * kwlist [] = {"obj" , "encoding" , "errors" , NULL };
124121 const char * encoding = NULL ;
125122 const char * errors = NULL ;
126123 PyObject * v ;
127124
128- if (!PyArg_ParseTupleAndKeywords (args , kwargs , "O|ss:decode" , kwlist ,
129- & v , & encoding , & errors ))
125+ if (!PyArg_ParseTuple (args , "O|ss:decode" , & v , & encoding , & errors ))
130126 return NULL ;
131127
132128 if (encoding == NULL )
@@ -1124,9 +1120,9 @@ static PyMethodDef _codecs_functions[] = {
11241120 register__doc__ },
11251121 {"lookup" , codec_lookup , METH_VARARGS ,
11261122 lookup__doc__ },
1127- {"encode" , ( PyCFunction ) codec_encode , METH_VARARGS | METH_KEYWORDS ,
1123+ {"encode" , codec_encode , METH_VARARGS ,
11281124 encode__doc__ },
1129- {"decode" , ( PyCFunction ) codec_decode , METH_VARARGS | METH_KEYWORDS ,
1125+ {"decode" , codec_decode , METH_VARARGS ,
11301126 decode__doc__ },
11311127 {"escape_encode" , escape_encode , METH_VARARGS },
11321128 {"escape_decode" , escape_decode , METH_VARARGS },
0 commit comments