summaryrefslogtreecommitdiffstats
path: root/Objects/bytesobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r--Objects/bytesobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 4edd93d..e139bed 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -2963,7 +2963,7 @@ _PyBytes_Resize(PyObject **pv, Py_ssize_t newsize)
}
_Py_NewReference(*pv);
sv = (PyBytesObject *) *pv;
- Py_SIZE(sv) = newsize;
+ Py_SET_SIZE(sv, newsize);
sv->ob_sval[newsize] = '\0';
sv->ob_shash = -1; /* invalidate cached hash value */
return 0;