@@ -41,12 +41,12 @@ static PyObject *cxoObject_trim(cxoObject*, PyObject*);
4141// declaration of methods for Python type "Object"
4242//-----------------------------------------------------------------------------
4343static PyMethodDef cxoObjectMethods [] = {
44- { "append" , (PyCFunction ) cxoObject_append , METH_VARARGS },
44+ { "append" , (PyCFunction ) cxoObject_append , METH_O },
4545 { "aslist" , (PyCFunction ) cxoObject_asList , METH_NOARGS },
4646 { "copy" , (PyCFunction ) cxoObject_copy , METH_NOARGS },
4747 { "delete" , (PyCFunction ) cxoObject_delete , METH_VARARGS },
4848 { "exists" , (PyCFunction ) cxoObject_exists , METH_VARARGS },
49- { "extend" , (PyCFunction ) cxoObject_extend , METH_VARARGS },
49+ { "extend" , (PyCFunction ) cxoObject_extend , METH_O },
5050 { "first" , (PyCFunction ) cxoObject_getFirstIndex , METH_NOARGS },
5151 { "getelement" , (PyCFunction ) cxoObject_getElement , METH_VARARGS },
5252 { "last" , (PyCFunction ) cxoObject_getLastIndex , METH_NOARGS },
@@ -336,15 +336,10 @@ int cxoObject_internalExtend(cxoObject *obj, PyObject *sequence)
336336// cxoObject_append()
337337// Append an item to the collection.
338338//-----------------------------------------------------------------------------
339- static PyObject * cxoObject_append (cxoObject * obj , PyObject * args )
339+ static PyObject * cxoObject_append (cxoObject * obj , PyObject * value )
340340{
341- PyObject * value ;
342-
343- if (!PyArg_ParseTuple (args , "O" , & value ))
344- return NULL ;
345341 if (cxoObject_internalAppend (obj , value ) < 0 )
346342 return NULL ;
347-
348343 Py_RETURN_NONE ;
349344}
350345
@@ -480,12 +475,8 @@ static PyObject *cxoObject_exists(cxoObject *obj, PyObject *args)
480475// cxoObject_extend()
481476// Extend the collection by appending each of the items in the sequence.
482477//-----------------------------------------------------------------------------
483- static PyObject * cxoObject_extend (cxoObject * obj , PyObject * args )
478+ static PyObject * cxoObject_extend (cxoObject * obj , PyObject * sequence )
484479{
485- PyObject * sequence ;
486-
487- if (!PyArg_ParseTuple (args , "O" , & sequence ))
488- return NULL ;
489480 if (cxoObject_internalExtend (obj , sequence ) < 0 )
490481 return NULL ;
491482 Py_RETURN_NONE ;
0 commit comments