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 | |
parent | 9f2e346911988cda95fec7c901e8d10d34fa9563 (diff) | |
download | cpython-5d7428b8ce0ffc79b24b05df2b3d2865db037902.zip cpython-5d7428b8ce0ffc79b24b05df2b3d2865db037902.tar.gz cpython-5d7428b8ce0ffc79b24b05df2b3d2865db037902.tar.bz2 |
Fix merge breakage.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_ctypes/_ctypes.c | 2 | ||||
-rw-r--r-- | Modules/arraymodule.c | 4 | ||||
-rw-r--r-- | Modules/datetimemodule.c | 12 |
3 files changed, 9 insertions, 9 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index e1b03a0..e6db969 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -4041,7 +4041,7 @@ Simple_repr(CDataObject *self) if (val == NULL) return NULL; - name = PyUnicode_FromString(self->ob_type->tp_name); + name = PyUnicode_FromString(Py_Type(self)->tp_name); if (name == NULL) { Py_DECREF(val); return NULL; diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index 89e3f25..36fec53 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -1235,7 +1235,7 @@ array. Also called as read."); static PyObject * array_tofile(arrayobject *self, PyObject *f) { - Py_ssize_t nbytes = self->ob_size * self->ob_descr->itemsize; + Py_ssize_t nbytes = Py_Size(self) * self->ob_descr->itemsize; /* Write 64K blocks at a time */ /* XXX Make the block size settable */ int BLOCKSIZE = 64*1024; @@ -1383,7 +1383,7 @@ static PyObject * array_tostring(arrayobject *self, PyObject *unused) { return PyBytes_FromStringAndSize(self->ob_item, - self->ob_size * self->ob_descr->itemsize); + Py_Size(self) * self->ob_descr->itemsize); } PyDoc_STRVAR(tostring_doc, 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[] = { |