mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
This reverts commit 0ef92d9793
.
This commit is contained in:
parent
19ac43629e
commit
0672a6c23b
8 changed files with 47 additions and 42 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue