use macros

This commit is contained in:
Benjamin Peterson 2009-09-17 21:33:46 +00:00
parent b926ebb896
commit 4fe03350b5
1 changed files with 1 additions and 1 deletions

View File

@ -3948,7 +3948,7 @@ static PyObject *
string_sizeof(PyStringObject *v)
{
Py_ssize_t res;
res = PyStringObject_SIZE + v->ob_size * v->ob_type->tp_itemsize;
res = PyStringObject_SIZE + PyString_GET_SIZE(v) * Py_TYPE(v)->tp_itemsize;
return PyInt_FromSsize_t(res);
}