@@ -1770,8 +1770,8 @@ static int _transformation_converter(PyObject* object, void* pointer)
1770
1770
GraphicsContext_draw_quad_mesh (GraphicsContext* self, PyObject* args)
1771
1771
{
1772
1772
CGAffineTransform master;
1773
- int meshWidth;
1774
- int meshHeight;
1773
+ size_t meshWidth;
1774
+ size_t meshHeight;
1775
1775
PyObject* coordinates;
1776
1776
PyArrayObject* coordinates_arr = 0 ;
1777
1777
PyObject* offsets;
@@ -1793,7 +1793,7 @@ static int _transformation_converter(PyObject* object, void* pointer)
1793
1793
return NULL ;
1794
1794
}
1795
1795
1796
- if (!PyArg_ParseTuple (args, " O&iiOOO &OiO" ,
1796
+ if (!PyArg_ParseTuple (args, " O&IIOOO &OiO" ,
1797
1797
_transformation_converter, &master,
1798
1798
&meshWidth,
1799
1799
&meshHeight,
@@ -3740,7 +3740,7 @@ static void _data_provider_release(void* info, const void* data, size_t size)
3740
3740
return NULL ;
3741
3741
}
3742
3742
3743
- data = [rep representationUsingType: filetype properties: nil ];
3743
+ data = [rep representationUsingType: filetype properties: [ NSDictionary dictionary ] ];
3744
3744
3745
3745
[data writeToFile: filename atomically: YES ];
3746
3746
[pool release ];
@@ -4575,7 +4575,7 @@ -(void)save_figure:(id)sender
4575
4575
}
4576
4576
NSMenu * menu = [button menu ];
4577
4577
NSArray * items = [menu itemArray ];
4578
- unsigned int n = [items count ];
4578
+ size_t n = [items count ];
4579
4579
int * states = calloc (n, sizeof (int ));
4580
4580
if (!states)
4581
4581
{
@@ -4597,14 +4597,13 @@ -(void)save_figure:(id)sender
4597
4597
m++;
4598
4598
}
4599
4599
}
4600
- int j = 0 ;
4600
+ Py_ssize_t list_index = 0 ;
4601
4601
PyObject* list = PyList_New (m);
4602
- for (i = 0 ; i < n; i ++)
4602
+ for (size_t state_index = 0 ; state_index < n; state_index ++)
4603
4603
{
4604
- if (states[i ]==1 )
4604
+ if (states[state_index ]==1 )
4605
4605
{
4606
- PyList_SET_ITEM (list, j, PyLong_FromLong (i));
4607
- j++;
4606
+ PyList_SET_ITEM (list, list_index++, PyLong_FromSize_t (state_index));
4608
4607
}
4609
4608
}
4610
4609
free (states);
0 commit comments