@@ -1366,8 +1366,8 @@ int reorder(double *xpp, double *ypp, short *kpp,
1366
1366
int maxnsegs = npts /2 + 1 ;
1367
1367
1368
1368
/* 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 ));
1371
1371
1372
1372
/* Find the segments. */
1373
1373
iseg = 0 ;
@@ -1400,7 +1400,7 @@ int reorder(double *xpp, double *ypp, short *kpp,
1400
1400
1401
1401
/* Find the subpaths as sets of connected segments. */
1402
1402
1403
- subp = malloc (nsegs * sizeof (int ));
1403
+ subp = ( int * ) malloc (nsegs * sizeof (int ));
1404
1404
for (i = 0 ; i < nsegs ; i ++ ) subp [i ] = -1 ;
1405
1405
1406
1406
nsp = 0 ;
@@ -1776,15 +1776,15 @@ Cntr_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
1776
1776
static int
1777
1777
Cntr_init (Cntr * self , PyObject * args , PyObject * kwds )
1778
1778
{
1779
- static char * kwlist [] = {"x" , "y" , "z" , "mask" , NULL };
1779
+ static const char * kwlist [] = {"x" , "y" , "z" , "mask" , NULL };
1780
1780
PyObject * xarg , * yarg , * zarg , * marg ;
1781
1781
PyArrayObject * xpa , * ypa , * zpa , * mpa ;
1782
1782
long iMax , jMax ;
1783
1783
char * mask ;
1784
1784
1785
1785
marg = NULL ;
1786
1786
1787
- if (! PyArg_ParseTupleAndKeywords (args , kwds , "OOO|O" , kwlist ,
1787
+ if (! PyArg_ParseTupleAndKeywords (args , kwds , "OOO|O" , ( char * * ) kwlist ,
1788
1788
& xarg , & yarg , & zarg , & marg ))
1789
1789
return -1 ;
1790
1790
if (marg == Py_None )
@@ -1858,9 +1858,9 @@ Cntr_trace(Cntr *self, PyObject *args, PyObject *kwds)
1858
1858
double levels [2 ] = {0.0 , -1e100 };
1859
1859
int nlevels = 2 ;
1860
1860
long nchunk = 0L ;
1861
- static char * kwlist [] = {"level0" , "level1" , "nchunk" , NULL };
1861
+ static const char * kwlist [] = {"level0" , "level1" , "nchunk" , NULL };
1862
1862
1863
- if (! PyArg_ParseTupleAndKeywords (args , kwds , "d|dl" , kwlist ,
1863
+ if (! PyArg_ParseTupleAndKeywords (args , kwds , "d|dl" , ( char * * ) kwlist ,
1864
1864
levels , levels + 1 , & nchunk ))
1865
1865
{
1866
1866
return NULL ;
0 commit comments