diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2001-08-16 13:15:00 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2001-08-16 13:15:00 (GMT) |
commit | e3eb1f2b2320bceb10a763ec8691200b85ec287a (patch) | |
tree | df47f81391869945dc661a08c405b53753fba887 /Objects/complexobject.c | |
parent | c35422109b36d20f409a3a72f60c0c7e2e0bc824 (diff) | |
download | cpython-e3eb1f2b2320bceb10a763ec8691200b85ec287a.zip cpython-e3eb1f2b2320bceb10a763ec8691200b85ec287a.tar.gz cpython-e3eb1f2b2320bceb10a763ec8691200b85ec287a.tar.bz2 |
Patch #427190: Implement and use METH_NOARGS and METH_O.
Diffstat (limited to 'Objects/complexobject.c')
-rw-r--r-- | Objects/complexobject.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Objects/complexobject.c b/Objects/complexobject.c index 5cfb3ca..84eee11 100644 --- a/Objects/complexobject.c +++ b/Objects/complexobject.c @@ -580,18 +580,16 @@ complex_float(PyObject *v) } static PyObject * -complex_conjugate(PyObject *self, PyObject *args) +complex_conjugate(PyObject *self) { Py_complex c; - if (!PyArg_ParseTuple(args, ":conjugate")) - return NULL; c = ((PyComplexObject *)self)->cval; c.imag = -c.imag; return PyComplex_FromCComplex(c); } static PyMethodDef complex_methods[] = { - {"conjugate", complex_conjugate, 1}, + {"conjugate", (PyCFunction)complex_conjugate, METH_NOARGS}, {NULL, NULL} /* sentinel */ }; |