@@ -35,7 +35,7 @@ imageop_crop(PyObject *self, PyObject *args)
3535 int ix , iy , xstep , ystep ;
3636 PyObject * rv ;
3737
38- if ( !PyArg_Parse (args , "( s#iiiiiii) " , & cp , & len , & size , & x , & y ,
38+ if ( !PyArg_ParseTuple (args , "s#iiiiiii" , & cp , & len , & size , & x , & y ,
3939 & newx1 , & newy1 , & newx2 , & newy2 ) )
4040 return 0 ;
4141
@@ -90,7 +90,7 @@ imageop_scale(PyObject *self, PyObject *args)
9090 int oix , oiy ;
9191 PyObject * rv ;
9292
93- if ( !PyArg_Parse (args , "( s#iiiii) " ,
93+ if ( !PyArg_ParseTuple (args , "s#iiiii" ,
9494 & cp , & len , & size , & x , & y , & newx , & newy ) )
9595 return 0 ;
9696
@@ -136,7 +136,7 @@ imageop_tovideo(PyObject *self, PyObject *args)
136136 PyObject * rv ;
137137
138138
139- if ( !PyArg_Parse (args , "( s#iii) " , & cp , & len , & width , & maxx , & maxy ) )
139+ if ( !PyArg_ParseTuple (args , "s#iii" , & cp , & len , & width , & maxx , & maxy ) )
140140 return 0 ;
141141
142142 if ( width != 1 && width != 4 ) {
@@ -190,7 +190,7 @@ imageop_grey2mono(PyObject *self, PyObject *args)
190190 int i , bit ;
191191
192192
193- if ( !PyArg_Parse (args , "( s#iii) " , & cp , & len , & x , & y , & tres ) )
193+ if ( !PyArg_ParseTuple (args , "s#iii" , & cp , & len , & x , & y , & tres ) )
194194 return 0 ;
195195
196196 if ( x * y != len ) {
@@ -231,7 +231,7 @@ imageop_grey2grey4(PyObject *self, PyObject *args)
231231 int pos ;
232232
233233
234- if ( !PyArg_Parse (args , "( s#ii) " , & cp , & len , & x , & y ) )
234+ if ( !PyArg_ParseTuple (args , "s#ii" , & cp , & len , & x , & y ) )
235235 return 0 ;
236236
237237 if ( x * y != len ) {
@@ -270,7 +270,7 @@ imageop_grey2grey2(PyObject *self, PyObject *args)
270270 int pos ;
271271
272272
273- if ( !PyArg_Parse (args , "( s#ii) " , & cp , & len , & x , & y ) )
273+ if ( !PyArg_ParseTuple (args , "s#ii" , & cp , & len , & x , & y ) )
274274 return 0 ;
275275
276276 if ( x * y != len ) {
@@ -308,7 +308,7 @@ imageop_dither2mono(PyObject *self, PyObject *args)
308308 int i , bit ;
309309
310310
311- if ( !PyArg_Parse (args , "( s#ii) " , & cp , & len , & x , & y ) )
311+ if ( !PyArg_ParseTuple (args , "s#ii" , & cp , & len , & x , & y ) )
312312 return 0 ;
313313
314314 if ( x * y != len ) {
@@ -354,7 +354,7 @@ imageop_dither2grey2(PyObject *self, PyObject *args)
354354 int sum = 0 , nvalue ;
355355
356356
357- if ( !PyArg_Parse (args , "( s#ii) " , & cp , & len , & x , & y ) )
357+ if ( !PyArg_ParseTuple (args , "s#ii" , & cp , & len , & x , & y ) )
358358 return 0 ;
359359
360360 if ( x * y != len ) {
@@ -393,7 +393,7 @@ imageop_mono2grey(PyObject *self, PyObject *args)
393393 PyObject * rv ;
394394 int i , bit ;
395395
396- if ( !PyArg_Parse (args , "( s#iiii) " , & cp , & len , & x , & y , & v0 , & v1 ) )
396+ if ( !PyArg_ParseTuple (args , "s#iiii" , & cp , & len , & x , & y , & v0 , & v1 ) )
397397 return 0 ;
398398
399399 nlen = x * y ;
@@ -430,7 +430,7 @@ imageop_grey22grey(PyObject *self, PyObject *args)
430430 PyObject * rv ;
431431 int i , pos , value = 0 , nvalue ;
432432
433- if ( !PyArg_Parse (args , "( s#ii) " , & cp , & len , & x , & y ) )
433+ if ( !PyArg_ParseTuple (args , "s#ii" , & cp , & len , & x , & y ) )
434434 return 0 ;
435435
436436 nlen = x * y ;
@@ -466,7 +466,7 @@ imageop_grey42grey(PyObject *self, PyObject *args)
466466 PyObject * rv ;
467467 int i , pos , value = 0 , nvalue ;
468468
469- if ( !PyArg_Parse (args , "( s#ii) " , & cp , & len , & x , & y ) )
469+ if ( !PyArg_ParseTuple (args , "s#ii" , & cp , & len , & x , & y ) )
470470 return 0 ;
471471
472472 nlen = x * y ;
@@ -503,7 +503,7 @@ imageop_rgb2rgb8(PyObject *self, PyObject *args)
503503 int i , r , g , b ;
504504 Py_UInt32 value , nvalue ;
505505
506- if ( !PyArg_Parse (args , "( s#ii) " , & cp , & len , & x , & y ) )
506+ if ( !PyArg_ParseTuple (args , "s#ii" , & cp , & len , & x , & y ) )
507507 return 0 ;
508508
509509 nlen = x * y ;
@@ -545,7 +545,7 @@ imageop_rgb82rgb(PyObject *self, PyObject *args)
545545 int i , r , g , b ;
546546 Py_UInt32 value , nvalue ;
547547
548- if ( !PyArg_Parse (args , "( s#ii) " , & cp , & len , & x , & y ) )
548+ if ( !PyArg_ParseTuple (args , "s#ii" , & cp , & len , & x , & y ) )
549549 return 0 ;
550550
551551 nlen = x * y ;
@@ -586,7 +586,7 @@ imageop_rgb2grey(PyObject *self, PyObject *args)
586586 int i , r , g , b ;
587587 Py_UInt32 value , nvalue ;
588588
589- if ( !PyArg_Parse (args , "( s#ii) " , & cp , & len , & x , & y ) )
589+ if ( !PyArg_ParseTuple (args , "s#ii" , & cp , & len , & x , & y ) )
590590 return 0 ;
591591
592592 nlen = x * y ;
@@ -622,7 +622,7 @@ imageop_grey2rgb(PyObject *self, PyObject *args)
622622 int i ;
623623 Py_UInt32 value ;
624624
625- if ( !PyArg_Parse (args , "( s#ii) " , & cp , & len , & x , & y ) )
625+ if ( !PyArg_ParseTuple (args , "s#ii" , & cp , & len , & x , & y ) )
626626 return 0 ;
627627
628628 nlen = x * y ;
@@ -677,21 +677,21 @@ imageop_mul(object *self, object *args)
677677*/
678678
679679static PyMethodDef imageop_methods [] = {
680- { "crop" , imageop_crop , METH_OLDARGS },
681- { "scale" , imageop_scale , METH_OLDARGS },
682- { "grey2mono" , imageop_grey2mono , METH_OLDARGS },
683- { "grey2grey2" , imageop_grey2grey2 , METH_OLDARGS },
684- { "grey2grey4" , imageop_grey2grey4 , METH_OLDARGS },
685- { "dither2mono" , imageop_dither2mono , METH_OLDARGS },
686- { "dither2grey2" , imageop_dither2grey2 , METH_OLDARGS },
687- { "mono2grey" , imageop_mono2grey , METH_OLDARGS },
688- { "grey22grey" , imageop_grey22grey , METH_OLDARGS },
689- { "grey42grey" , imageop_grey42grey , METH_OLDARGS },
690- { "tovideo" , imageop_tovideo , METH_OLDARGS },
691- { "rgb2rgb8" , imageop_rgb2rgb8 , METH_OLDARGS },
692- { "rgb82rgb" , imageop_rgb82rgb , METH_OLDARGS },
693- { "rgb2grey" , imageop_rgb2grey , METH_OLDARGS },
694- { "grey2rgb" , imageop_grey2rgb , METH_OLDARGS },
680+ { "crop" , imageop_crop , METH_VARARGS },
681+ { "scale" , imageop_scale , METH_VARARGS },
682+ { "grey2mono" , imageop_grey2mono , METH_VARARGS },
683+ { "grey2grey2" , imageop_grey2grey2 , METH_VARARGS },
684+ { "grey2grey4" , imageop_grey2grey4 , METH_VARARGS },
685+ { "dither2mono" , imageop_dither2mono , METH_VARARGS },
686+ { "dither2grey2" , imageop_dither2grey2 , METH_VARARGS },
687+ { "mono2grey" , imageop_mono2grey , METH_VARARGS },
688+ { "grey22grey" , imageop_grey22grey , METH_VARARGS },
689+ { "grey42grey" , imageop_grey42grey , METH_VARARGS },
690+ { "tovideo" , imageop_tovideo , METH_VARARGS },
691+ { "rgb2rgb8" , imageop_rgb2rgb8 , METH_VARARGS },
692+ { "rgb82rgb" , imageop_rgb82rgb , METH_VARARGS },
693+ { "rgb2grey" , imageop_rgb2grey , METH_VARARGS },
694+ { "grey2rgb" , imageop_grey2rgb , METH_VARARGS },
695695 { 0 , 0 }
696696};
697697
0 commit comments