mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Issue #23501: Argumen Clinic now generates code into separate files by default.
This commit is contained in:
parent
0759f84d62
commit
1009bf18b3
54 changed files with 9262 additions and 8731 deletions
|
@ -26,6 +26,8 @@ class datetime.datetime "PyDateTime_DateTime *" "&PyDateTime_DateTimeType"
|
|||
[clinic start generated code]*/
|
||||
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=78142cb64b9e98bc]*/
|
||||
|
||||
#include "clinic/_datetimemodule.c.h"
|
||||
|
||||
/* We require that C int be at least 32 bits, and use int virtually
|
||||
* everywhere. In just a few cases we use a temp long, where a Python
|
||||
* API returns a C long. In such cases, we have to ensure that the
|
||||
|
@ -4133,43 +4135,9 @@ Returns new datetime object representing current time local to tz.
|
|||
If no tz is specified, uses local timezone.
|
||||
[clinic start generated code]*/
|
||||
|
||||
PyDoc_STRVAR(datetime_datetime_now__doc__,
|
||||
"now($type, /, tz=None)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
"Returns new datetime object representing current time local to tz.\n"
|
||||
"\n"
|
||||
" tz\n"
|
||||
" Timezone object.\n"
|
||||
"\n"
|
||||
"If no tz is specified, uses local timezone.");
|
||||
|
||||
#define DATETIME_DATETIME_NOW_METHODDEF \
|
||||
{"now", (PyCFunction)datetime_datetime_now, METH_VARARGS|METH_KEYWORDS|METH_CLASS, datetime_datetime_now__doc__},
|
||||
|
||||
static PyObject *
|
||||
datetime_datetime_now_impl(PyTypeObject *type, PyObject *tz);
|
||||
|
||||
static PyObject *
|
||||
datetime_datetime_now(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
static char *_keywords[] = {"tz", NULL};
|
||||
PyObject *tz = Py_None;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|O:now", _keywords,
|
||||
&tz))
|
||||
goto exit;
|
||||
return_value = datetime_datetime_now_impl(type, tz);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
datetime_datetime_now_impl(PyTypeObject *type, PyObject *tz)
|
||||
/*[clinic end generated code: output=583c5637e3c843fa input=80d09869c5267d00]*/
|
||||
/*[clinic end generated code: output=b3386e5345e2b47a input=80d09869c5267d00]*/
|
||||
{
|
||||
PyObject *self;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue