File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3274,22 +3274,17 @@ date_today(PyObject *cls, PyObject *Py_UNUSED(dummy))
32743274 tm .tm_mday ,
32753275 (PyTypeObject * )cls );
32763276 }
3277- else {
3278- PyObject * time ;
3279- PyObject * result ;
3280- time = time_time ();
3281- if (time == NULL ) {
3282- return NULL ;
3283- }
3284-
3285- /* Note well: today() is a class method, so this may not call
3286- * date.fromtimestamp. For example, it may call
3287- * datetime.fromtimestamp.
3288- */
3289- result = PyObject_CallMethodOneArg (cls , & _Py_ID (fromtimestamp ), time );
3290- Py_DECREF (time );
3291- return result ;
3277+ PyObject * time = time_time ();
3278+ if (time == NULL ) {
3279+ return NULL ;
32923280 }
3281+
3282+ /* Note well: since today() is a class method, it may not call
3283+ * date.fromtimestamp, e.g., it may call datetime.fromtimestamp.
3284+ */
3285+ PyObject * result = PyObject_CallMethodOneArg (cls , & _Py_ID (fromtimestamp ), time );
3286+ Py_DECREF (time );
3287+ return result ;
32933288}
32943289
32953290/*[clinic input]
You can’t perform that action at this time.
0 commit comments