@@ -1887,8 +1887,8 @@ static int _transformation_converter(PyObject* object, void* pointer)
18871887 }
18881888
18891889 size_t i = 0 ;
1890- size_t iw = 0 ;
1891- size_t ih = 0 ;
1890+ int iw = 0 ;
1891+ int ih = 0 ;
18921892
18931893 /* Preset graphics context properties if possible */
18941894 CGContextSetShouldAntialias (cr, antialiased);
@@ -3740,7 +3740,7 @@ static void _data_provider_release(void* info, const void* data, size_t size)
37403740 return NULL ;
37413741 }
37423742
3743- data = [rep representationUsingType: filetype properties: nil ];
3743+ data = [rep representationUsingType: filetype properties: [ NSDictionary dictionary ] ];
37443744
37453745 [data writeToFile: filename atomically: YES ];
37463746 [pool release ];
@@ -4575,7 +4575,7 @@ -(void)save_figure:(id)sender
45754575 }
45764576 NSMenu * menu = [button menu ];
45774577 NSArray * items = [menu itemArray ];
4578- unsigned int n = [items count ];
4578+ size_t n = [items count ];
45794579 int * states = calloc (n, sizeof (int ));
45804580 if (!states)
45814581 {
@@ -4597,14 +4597,13 @@ -(void)save_figure:(id)sender
45974597 m++;
45984598 }
45994599 }
4600- int j = 0 ;
4600+ Py_ssize_t list_index = 0 ;
46014601 PyObject* list = PyList_New (m);
4602- for (i = 0 ; i < n; i ++)
4602+ for (size_t state_index = 0 ; state_index < n; state_index ++)
46034603 {
4604- if (states[i ]==1 )
4604+ if (states[state_index ]==1 )
46054605 {
4606- PyList_SET_ITEM (list, j, PyLong_FromLong (i));
4607- j++;
4606+ PyList_SET_ITEM (list, list_index++, PyLong_FromSize_t (state_index));
46084607 }
46094608 }
46104609 free (states);
0 commit comments