mirror of
https://github.com/python/cpython.git
synced 2025-07-29 22:24:49 +00:00
Convert more modules to METH_VARARGS.
This commit is contained in:
parent
96a8c3954c
commit
bf92f46572
8 changed files with 139 additions and 113 deletions
|
@ -277,12 +277,8 @@ PyDoc_STRVAR(math_log_doc,
|
|||
If the base not specified, returns the natural logarithm (base e) of x.");
|
||||
|
||||
static PyObject *
|
||||
math_log10(PyObject *self, PyObject *args)
|
||||
math_log10(PyObject *self, PyObject *arg)
|
||||
{
|
||||
PyObject *arg;
|
||||
|
||||
if (!PyArg_UnpackTuple(args, "log10", 1, 1, &arg))
|
||||
return NULL;
|
||||
return loghelper(args, log10, "d:log10", arg);
|
||||
}
|
||||
|
||||
|
@ -332,7 +328,7 @@ static PyMethodDef math_methods[] = {
|
|||
{"hypot", math_hypot, METH_VARARGS, math_hypot_doc},
|
||||
{"ldexp", math_ldexp, METH_VARARGS, math_ldexp_doc},
|
||||
{"log", math_log, METH_VARARGS, math_log_doc},
|
||||
{"log10", math_log10, METH_VARARGS, math_log10_doc},
|
||||
{"log10", math_log10, METH_O, math_log10_doc},
|
||||
{"modf", math_modf, METH_VARARGS, math_modf_doc},
|
||||
{"pow", math_pow, METH_VARARGS, math_pow_doc},
|
||||
{"radians", math_radians, METH_VARARGS, math_radians_doc},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue