@@ -183,13 +183,10 @@ cl_DecompressImage(PyObject *self, PyObject *args)
183183}
184184
185185static PyObject *
186- doClose (clobject * self , PyObject * args , int (* close_func )(CL_Handle ))
186+ doClose (clobject * self , int (* close_func )(CL_Handle ))
187187{
188188 CheckCompressor (self );
189189
190- if (!PyArg_NoArgs (args ))
191- return NULL ;
192-
193190 error_handler_called = 0 ;
194191 if ((* close_func )(self -> ob_compressorHdl ) == FAILURE ||
195192 error_handler_called ) {
@@ -209,15 +206,15 @@ doClose(clobject *self, PyObject *args, int (*close_func)(CL_Handle))
209206}
210207
211208static PyObject *
212- clm_CloseCompressor (PyObject * self , PyObject * args )
209+ clm_CloseCompressor (PyObject * self )
213210{
214- return doClose (SELF , args , clCloseCompressor );
211+ return doClose (SELF , clCloseCompressor );
215212}
216213
217214static PyObject *
218- clm_CloseDecompressor (PyObject * self , PyObject * args )
215+ clm_CloseDecompressor (PyObject * self )
219216{
220- return doClose (SELF , args , clCloseDecompressor );
217+ return doClose (SELF , clCloseDecompressor );
221218}
222219
223220static PyObject *
@@ -479,7 +476,7 @@ clm_GetParamID(PyObject *self, PyObject *args)
479476}
480477
481478static PyObject *
482- clm_QueryParams (PyObject * self , PyObject * args )
479+ clm_QueryParams (PyObject * self )
483480{
484481 int bufferlength ;
485482 int * PVbuffer ;
@@ -488,9 +485,6 @@ clm_QueryParams(PyObject *self, PyObject *args)
488485
489486 CheckCompressor (SELF );
490487
491- if (!PyArg_NoArgs (args ))
492- return NULL ;
493-
494488 error_handler_called = 0 ;
495489 bufferlength = clQueryParams (SELF -> ob_compressorHdl , 0 , 0 );
496490 if (error_handler_called )
@@ -574,13 +568,9 @@ clm_GetName(PyObject *self, PyObject *args)
574568}
575569
576570static PyObject *
577- clm_QuerySchemeFromHandle (PyObject * self , PyObject * args )
571+ clm_QuerySchemeFromHandle (PyObject * self )
578572{
579573 CheckCompressor (SELF );
580-
581- if (!PyArg_NoArgs (args ))
582- return NULL ;
583-
584574 return PyInt_FromLong (clQuerySchemeFromHandle (SELF -> ob_compressorHdl ));
585575}
586576
@@ -600,25 +590,25 @@ clm_ReadHeader(PyObject *self, PyObject *args)
600590}
601591
602592static PyMethodDef compressor_methods [] = {
603- {"close" , clm_CloseCompressor , METH_OLDARGS }, /* alias */
604- {"CloseCompressor" , clm_CloseCompressor , METH_OLDARGS },
593+ {"close" , clm_CloseCompressor , METH_NOARGS }, /* alias */
594+ {"CloseCompressor" , clm_CloseCompressor , METH_NOARGS },
605595 {"Compress" , clm_Compress , METH_OLDARGS },
606596 {"GetDefault" , clm_GetDefault , METH_OLDARGS },
607597 {"GetMinMax" , clm_GetMinMax , METH_OLDARGS },
608598 {"GetName" , clm_GetName , METH_OLDARGS },
609599 {"GetParam" , clm_GetParam , METH_OLDARGS },
610600 {"GetParamID" , clm_GetParamID , METH_OLDARGS },
611601 {"GetParams" , clm_GetParams , METH_OLDARGS },
612- {"QueryParams" , clm_QueryParams , METH_OLDARGS },
613- {"QuerySchemeFromHandle" ,clm_QuerySchemeFromHandle , METH_OLDARGS },
602+ {"QueryParams" , clm_QueryParams , METH_NOARGS },
603+ {"QuerySchemeFromHandle" ,clm_QuerySchemeFromHandle , METH_NOARGS },
614604 {"SetParam" , clm_SetParam , METH_OLDARGS },
615605 {"SetParams" , clm_SetParams , METH_OLDARGS },
616606 {NULL , NULL } /* sentinel */
617607};
618608
619609static PyMethodDef decompressor_methods [] = {
620- {"close" , clm_CloseDecompressor , METH_OLDARGS }, /* alias */
621- {"CloseDecompressor" , clm_CloseDecompressor , METH_OLDARGS },
610+ {"close" , clm_CloseDecompressor , METH_NOARGS }, /* alias */
611+ {"CloseDecompressor" , clm_CloseDecompressor , METH_NOARGS },
622612 {"Decompress" , clm_Decompress , METH_OLDARGS },
623613 {"GetDefault" , clm_GetDefault , METH_OLDARGS },
624614 {"GetMinMax" , clm_GetMinMax , METH_OLDARGS },
@@ -627,8 +617,8 @@ static PyMethodDef decompressor_methods[] = {
627617 {"GetParamID" , clm_GetParamID , METH_OLDARGS },
628618 {"GetParams" , clm_GetParams , METH_OLDARGS },
629619 {"ReadHeader" , clm_ReadHeader , METH_OLDARGS },
630- {"QueryParams" , clm_QueryParams , METH_OLDARGS },
631- {"QuerySchemeFromHandle" ,clm_QuerySchemeFromHandle , METH_OLDARGS },
620+ {"QueryParams" , clm_QueryParams , METH_NOARGS },
621+ {"QuerySchemeFromHandle" ,clm_QuerySchemeFromHandle , METH_NOARGS },
632622 {"SetParam" , clm_SetParam , METH_OLDARGS },
633623 {"SetParams" , clm_SetParams , METH_OLDARGS },
634624 {NULL , NULL } /* sentinel */
0 commit comments