use macros
This commit is contained in:
parent
b926ebb896
commit
4fe03350b5
|
@ -3948,7 +3948,7 @@ static PyObject *
|
||||||
string_sizeof(PyStringObject *v)
|
string_sizeof(PyStringObject *v)
|
||||||
{
|
{
|
||||||
Py_ssize_t res;
|
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);
|
return PyInt_FromSsize_t(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue