summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/complexobject.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Objects/complexobject.c b/Objects/complexobject.c
index a186c8e..2e97713 100644
--- a/Objects/complexobject.c
+++ b/Objects/complexobject.c
@@ -573,17 +573,20 @@ complex_float(v)
}
static PyObject *
-complex_conjugate(self)
+complex_conjugate(self, args)
PyObject *self;
+ PyObject *args;
{
Py_complex c;
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
c = ((PyComplexObject *)self)->cval;
c.imag = -c.imag;
return PyComplex_FromCComplex(c);
}
static PyMethodDef complex_methods[] = {
- {"conjugate", (PyCFunction)complex_conjugate, 1},
+ {"conjugate", complex_conjugate, 1},
{NULL, NULL} /* sentinel */
};