@@ -1366,8 +1366,8 @@ int reorder(double *xpp, double *ypp, short *kpp,
13661366 int maxnsegs = npts /2 + 1 ;
13671367
13681368 /* allocate maximum possible size--gross overkill */
1369- i0 = malloc (maxnsegs * sizeof (int ));
1370- i1 = malloc (maxnsegs * sizeof (int ));
1369+ i0 = ( int * ) malloc (maxnsegs * sizeof (int ));
1370+ i1 = ( int * ) malloc (maxnsegs * sizeof (int ));
13711371
13721372 /* Find the segments. */
13731373 iseg = 0 ;
@@ -1400,7 +1400,7 @@ int reorder(double *xpp, double *ypp, short *kpp,
14001400
14011401 /* Find the subpaths as sets of connected segments. */
14021402
1403- subp = malloc (nsegs * sizeof (int ));
1403+ subp = ( int * ) malloc (nsegs * sizeof (int ));
14041404 for (i = 0 ; i < nsegs ; i ++ ) subp [i ] = -1 ;
14051405
14061406 nsp = 0 ;
@@ -1776,15 +1776,15 @@ Cntr_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
17761776static int
17771777Cntr_init (Cntr * self , PyObject * args , PyObject * kwds )
17781778{
1779- static char * kwlist [] = {"x" , "y" , "z" , "mask" , NULL };
1779+ static const char * kwlist [] = {"x" , "y" , "z" , "mask" , NULL };
17801780 PyObject * xarg , * yarg , * zarg , * marg ;
17811781 PyArrayObject * xpa , * ypa , * zpa , * mpa ;
17821782 long iMax , jMax ;
17831783 char * mask ;
17841784
17851785 marg = NULL ;
17861786
1787- if (! PyArg_ParseTupleAndKeywords (args , kwds , "OOO|O" , kwlist ,
1787+ if (! PyArg_ParseTupleAndKeywords (args , kwds , "OOO|O" , ( char * * ) kwlist ,
17881788 & xarg , & yarg , & zarg , & marg ))
17891789 return -1 ;
17901790 if (marg == Py_None )
@@ -1858,9 +1858,9 @@ Cntr_trace(Cntr *self, PyObject *args, PyObject *kwds)
18581858 double levels [2 ] = {0.0 , -1e100 };
18591859 int nlevels = 2 ;
18601860 long nchunk = 0L ;
1861- static char * kwlist [] = {"level0" , "level1" , "nchunk" , NULL };
1861+ static const char * kwlist [] = {"level0" , "level1" , "nchunk" , NULL };
18621862
1863- if (! PyArg_ParseTupleAndKeywords (args , kwds , "d|dl" , kwlist ,
1863+ if (! PyArg_ParseTupleAndKeywords (args , kwds , "d|dl" , ( char * * ) kwlist ,
18641864 levels , levels + 1 , & nchunk ))
18651865 {
18661866 return NULL ;
0 commit comments