diff options
author | Larry Hastings <larry@hastings.org> | 2013-11-23 22:54:00 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2013-11-23 22:54:00 (GMT) |
commit | ebdcb50b8a0d37af4acd7d2387eae8ff2b5f0b9b (patch) | |
tree | 37c439db53352c588bac7c9fb5b05457ce52fa3e /Modules/_datetimemodule.c | |
parent | 3a9079742f2d71e6968823e155f3778473113538 (diff) | |
download | cpython-ebdcb50b8a0d37af4acd7d2387eae8ff2b5f0b9b.zip cpython-ebdcb50b8a0d37af4acd7d2387eae8ff2b5f0b9b.tar.gz cpython-ebdcb50b8a0d37af4acd7d2387eae8ff2b5f0b9b.tar.bz2 |
Issue #19730: Argument Clinic now supports all the existing PyArg
"format units" as legacy converters, as well as two new features:
"self converters" and the "version" directive.
Diffstat (limited to 'Modules/_datetimemodule.c')
-rw-r--r-- | Modules/_datetimemodule.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index 91456e9..13c4ecc 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -4167,10 +4167,10 @@ PyDoc_STRVAR(datetime_datetime_now__doc__, {"now", (PyCFunction)datetime_datetime_now, METH_VARARGS|METH_KEYWORDS|METH_CLASS, datetime_datetime_now__doc__}, static PyObject * -datetime_datetime_now_impl(PyObject *cls, PyObject *tz); +datetime_datetime_now_impl(PyTypeObject *cls, PyObject *tz); static PyObject * -datetime_datetime_now(PyObject *cls, PyObject *args, PyObject *kwargs) +datetime_datetime_now(PyTypeObject *cls, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; static char *_keywords[] = {"tz", NULL}; @@ -4187,8 +4187,8 @@ exit: } static PyObject * -datetime_datetime_now_impl(PyObject *cls, PyObject *tz) -/*[clinic checksum: cde1daca68c9b7dca6df51759db2de1d43a39774]*/ +datetime_datetime_now_impl(PyTypeObject *cls, PyObject *tz) +/*[clinic checksum: 5e61647d5d1feaf1ab096c5406ccea17bb7b061c]*/ { PyObject *self; @@ -4198,7 +4198,7 @@ datetime_datetime_now_impl(PyObject *cls, PyObject *tz) if (check_tzinfo_subclass(tz) < 0) return NULL; - self = datetime_best_possible(cls, + self = datetime_best_possible((PyObject *)cls, tz == Py_None ? localtime : gmtime, tz); if (self != NULL && tz != Py_None) { |