Commit 4fe03350 authored by Benjamin Peterson's avatar Benjamin Peterson

use macros

parent b926ebb8
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment