File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3292,7 +3292,7 @@ datetime_date_today_impl(PyTypeObject *type)
32923292/*[clinic end generated code: output=d5474697df6b251c input=21688afa289c0a06]*/
32933293{
32943294 /* Use C implementation to boost performance for date type */
3295- if (( PyTypeObject * ) cls == & PyDateTime_DateType ) {
3295+ if (type == & PyDateTime_DateType ) {
32963296 struct tm tm ;
32973297 time_t t ;
32983298 time (& t );
@@ -3304,7 +3304,7 @@ datetime_date_today_impl(PyTypeObject *type)
33043304 return new_date_ex (tm .tm_year + 1900 ,
33053305 tm .tm_mon + 1 ,
33063306 tm .tm_mday ,
3307- ( PyTypeObject * ) cls );
3307+ type );
33083308 }
33093309
33103310 PyObject * time = time_time ();
@@ -3315,7 +3315,7 @@ datetime_date_today_impl(PyTypeObject *type)
33153315 /* Note well: since today() is a class method, it may not call
33163316 * date.fromtimestamp, e.g., it may call datetime.fromtimestamp.
33173317 */
3318- PyObject * result = PyObject_CallMethodOneArg (cls , & _Py_ID (fromtimestamp ), time );
3318+ PyObject * result = PyObject_CallMethodOneArg (( PyObject * ) type , & _Py_ID (fromtimestamp ), time );
33193319 Py_DECREF (time );
33203320 return result ;
33213321}
You can’t perform that action at this time.
0 commit comments