diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2007-07-21 18:47:48 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2007-07-21 18:47:48 (GMT) |
commit | 5d7428b8ce0ffc79b24b05df2b3d2865db037902 (patch) | |
tree | c673d91d8fe112d194cb9bbf45006b8b35838965 /Modules/datetimemodule.c | |
parent | 9f2e346911988cda95fec7c901e8d10d34fa9563 (diff) | |
download | cpython-5d7428b8ce0ffc79b24b05df2b3d2865db037902.zip cpython-5d7428b8ce0ffc79b24b05df2b3d2865db037902.tar.gz cpython-5d7428b8ce0ffc79b24b05df2b3d2865db037902.tar.bz2 |
Fix merge breakage.
Diffstat (limited to 'Modules/datetimemodule.c')
-rw-r--r-- | Modules/datetimemodule.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/datetimemodule.c b/Modules/datetimemodule.c index 5b2893d..61bba86 100644 --- a/Modules/datetimemodule.c +++ b/Modules/datetimemodule.c @@ -950,7 +950,7 @@ call_tzname(PyObject *tzinfo, PyObject *tzinfoarg) if (!PyString_Check(result) && !PyUnicode_Check(result)) { PyErr_Format(PyExc_TypeError, "tzinfo.tzname() must " "return None or a string, not '%s'", - result->ob_type->tp_name); + Py_Type(result)->tp_name); Py_DECREF(result); result = NULL; } @@ -1969,18 +1969,18 @@ delta_repr(PyDateTime_Delta *self) { if (GET_TD_MICROSECONDS(self) != 0) return PyUnicode_FromFormat("%s(%d, %d, %d)", - self->ob_type->tp_name, + Py_Type(self)->tp_name, GET_TD_DAYS(self), GET_TD_SECONDS(self), GET_TD_MICROSECONDS(self)); if (GET_TD_SECONDS(self) != 0) return PyUnicode_FromFormat("%s(%d, %d)", - self->ob_type->tp_name, + Py_Type(self)->tp_name, GET_TD_DAYS(self), GET_TD_SECONDS(self)); return PyUnicode_FromFormat("%s(%d)", - self->ob_type->tp_name, + Py_Type(self)->tp_name, GET_TD_DAYS(self)); } @@ -2381,7 +2381,7 @@ static PyObject * date_repr(PyDateTime_Date *self) { return PyUnicode_FromFormat("%s(%d, %d, %d)", - self->ob_type->tp_name, + Py_Type(self)->tp_name, GET_YEAR(self), GET_MONTH(self), GET_DAY(self)); } @@ -2557,7 +2557,7 @@ date_getstate(PyDateTime_Date *self, int hashable) static PyObject * date_reduce(PyDateTime_Date *self, PyObject *arg) { - return Py_BuildValue("(ON)", self->ob_type, date_getstate(self, 0)); + return Py_BuildValue("(ON)", Py_Type(self), date_getstate(self, 0)); } static PyMethodDef date_methods[] = { |