diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-04-03 20:53:51 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-04-03 20:53:51 (GMT) |
commit | 1009bf18b38a8d36298575191dd8fdf43f8f9097 (patch) | |
tree | 18860fdef30c931dc2ea177059e96b69a49fa04f /Modules/_datetimemodule.c | |
parent | 0759f84d6260bad1234b802212e73fdc5873d261 (diff) | |
download | cpython-1009bf18b38a8d36298575191dd8fdf43f8f9097.zip cpython-1009bf18b38a8d36298575191dd8fdf43f8f9097.tar.gz cpython-1009bf18b38a8d36298575191dd8fdf43f8f9097.tar.bz2 |
Issue #23501: Argumen Clinic now generates code into separate files by default.
Diffstat (limited to 'Modules/_datetimemodule.c')
-rw-r--r-- | Modules/_datetimemodule.c | 38 |
1 files changed, 3 insertions, 35 deletions
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index ab2acae..7e4be5b 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -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; |