Revert "gh-89381: Fix invalid signatures of math/cmath.log (#101404)" (#101580)

This reverts commit 0ef92d9793.
This commit is contained in:
Mark Dickinson 2023-02-05 16:36:33 +00:00 committed by GitHub
parent 19ac43629e
commit 0672a6c23b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 47 additions and 42 deletions

View file

@ -952,24 +952,23 @@ cmath_tanh_impl(PyObject *module, Py_complex z)
cmath.log
z as x: Py_complex
base as y_obj: object = None
base as y_obj: object = NULL
/
log(z[, base]) -> the logarithm of z to the given base.
If the base is not specified or is None, returns the
natural logarithm (base e) of z.
If the base not specified, returns the natural logarithm (base e) of z.
[clinic start generated code]*/
static PyObject *
cmath_log_impl(PyObject *module, Py_complex x, PyObject *y_obj)
/*[clinic end generated code: output=4effdb7d258e0d94 input=e7db51859ebf70bf]*/
/*[clinic end generated code: output=4effdb7d258e0d94 input=230ed3a71ecd000a]*/
{
Py_complex y;
errno = 0;
x = c_log(x);
if (y_obj != Py_None) {
if (y_obj != NULL) {
y = PyComplex_AsCComplex(y_obj);
if (PyErr_Occurred()) {
return NULL;