@@ -1887,8 +1887,8 @@ static int _transformation_converter(PyObject* object, void* pointer)
1887
1887
}
1888
1888
1889
1889
size_t i = 0 ;
1890
- size_t iw = 0 ;
1891
- size_t ih = 0 ;
1890
+ int iw = 0 ;
1891
+ int ih = 0 ;
1892
1892
1893
1893
/* Preset graphics context properties if possible */
1894
1894
CGContextSetShouldAntialias (cr, antialiased);
@@ -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