@@ -950,7 +950,7 @@ call_tzname(PyObject *tzinfo, PyObject *tzinfoarg)
950950 if (!PyString_Check (result ) && !PyUnicode_Check (result )) {
951951 PyErr_Format (PyExc_TypeError , "tzinfo.tzname() must "
952952 "return None or a string, not '%s'" ,
953- result -> ob_type -> tp_name );
953+ Py_Type ( result ) -> tp_name );
954954 Py_DECREF (result );
955955 result = NULL ;
956956 }
@@ -1969,18 +1969,18 @@ delta_repr(PyDateTime_Delta *self)
19691969{
19701970 if (GET_TD_MICROSECONDS (self ) != 0 )
19711971 return PyUnicode_FromFormat ("%s(%d, %d, %d)" ,
1972- self -> ob_type -> tp_name ,
1972+ Py_Type ( self ) -> tp_name ,
19731973 GET_TD_DAYS (self ),
19741974 GET_TD_SECONDS (self ),
19751975 GET_TD_MICROSECONDS (self ));
19761976 if (GET_TD_SECONDS (self ) != 0 )
19771977 return PyUnicode_FromFormat ("%s(%d, %d)" ,
1978- self -> ob_type -> tp_name ,
1978+ Py_Type ( self ) -> tp_name ,
19791979 GET_TD_DAYS (self ),
19801980 GET_TD_SECONDS (self ));
19811981
19821982 return PyUnicode_FromFormat ("%s(%d)" ,
1983- self -> ob_type -> tp_name ,
1983+ Py_Type ( self ) -> tp_name ,
19841984 GET_TD_DAYS (self ));
19851985}
19861986
@@ -2381,7 +2381,7 @@ static PyObject *
23812381date_repr (PyDateTime_Date * self )
23822382{
23832383 return PyUnicode_FromFormat ("%s(%d, %d, %d)" ,
2384- self -> ob_type -> tp_name ,
2384+ Py_Type ( self ) -> tp_name ,
23852385 GET_YEAR (self ), GET_MONTH (self ), GET_DAY (self ));
23862386}
23872387
@@ -2557,7 +2557,7 @@ date_getstate(PyDateTime_Date *self, int hashable)
25572557static PyObject *
25582558date_reduce (PyDateTime_Date * self , PyObject * arg )
25592559{
2560- return Py_BuildValue ("(ON)" , self -> ob_type , date_getstate (self , 0 ));
2560+ return Py_BuildValue ("(ON)" , Py_Type ( self ) , date_getstate (self , 0 ));
25612561}
25622562
25632563static PyMethodDef date_methods [] = {
0 commit comments