@@ -67,7 +67,7 @@ typedef struct {
67
67
static char * incnewkwarglist [] = {"errors" , NULL };
68
68
static char * streamkwarglist [] = {"stream" , "errors" , NULL };
69
69
70
- static PyObject * multibytecodec_encode (MultibyteCodec * ,
70
+ static PyObject * multibytecodec_encode (const MultibyteCodec * ,
71
71
MultibyteCodec_State * , PyObject * , Py_ssize_t * ,
72
72
PyObject * , int );
73
73
@@ -221,7 +221,7 @@ expand_encodebuffer(MultibyteEncodeBuffer *buf, Py_ssize_t esize)
221
221
*/
222
222
223
223
static int
224
- multibytecodec_encerror (MultibyteCodec * codec ,
224
+ multibytecodec_encerror (const MultibyteCodec * codec ,
225
225
MultibyteCodec_State * state ,
226
226
MultibyteEncodeBuffer * buf ,
227
227
PyObject * errors , Py_ssize_t e )
@@ -375,7 +375,7 @@ multibytecodec_encerror(MultibyteCodec *codec,
375
375
}
376
376
377
377
static int
378
- multibytecodec_decerror (MultibyteCodec * codec ,
378
+ multibytecodec_decerror (const MultibyteCodec * codec ,
379
379
MultibyteCodec_State * state ,
380
380
MultibyteDecodeBuffer * buf ,
381
381
PyObject * errors , Py_ssize_t e )
@@ -479,7 +479,7 @@ multibytecodec_decerror(MultibyteCodec *codec,
479
479
}
480
480
481
481
static PyObject *
482
- multibytecodec_encode (MultibyteCodec * codec ,
482
+ multibytecodec_encode (const MultibyteCodec * codec ,
483
483
MultibyteCodec_State * state ,
484
484
PyObject * text , Py_ssize_t * inpos_t ,
485
485
PyObject * errors , int flags )
@@ -1953,7 +1953,7 @@ _multibytecodec___create_codec(PyObject *module, PyObject *arg)
1953
1953
/*[clinic end generated code: output=cfa3dce8260e809d input=6840b2a6b183fcfa]*/
1954
1954
{
1955
1955
MultibyteCodecObject * self ;
1956
- MultibyteCodec * codec ;
1956
+ const MultibyteCodec * codec ;
1957
1957
1958
1958
if (!PyCapsule_IsValid (arg , PyMultibyteCodec_CAPSULE_NAME )) {
1959
1959
PyErr_SetString (PyExc_ValueError , "argument type invalid" );
0 commit comments