summaryrefslogtreecommitdiffstats
path: root/Objects/stringlib
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-02-07 22:18:08 (GMT)
committerGitHub <noreply@github.com>2020-02-07 22:18:08 (GMT)
commit60ac6ed5579f6666130fc264d3b748ee9575e3aa (patch)
treec21d06611bea34d88dd5922850223837fa6ae733 /Objects/stringlib
parentde6f38db4859f7b8fe4da4556f06c52675fff24a (diff)
downloadcpython-60ac6ed5579f6666130fc264d3b748ee9575e3aa.zip
cpython-60ac6ed5579f6666130fc264d3b748ee9575e3aa.tar.gz
cpython-60ac6ed5579f6666130fc264d3b748ee9575e3aa.tar.bz2
bpo-39573: Use Py_SET_SIZE() function (GH-18402)
Replace direct acccess to PyVarObject.ob_size with usage of the Py_SET_SIZE() function.
Diffstat (limited to 'Objects/stringlib')
-rw-r--r--Objects/stringlib/split.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/stringlib/split.h b/Objects/stringlib/split.h
index 31f77a7..068047f 100644
--- a/Objects/stringlib/split.h
+++ b/Objects/stringlib/split.h
@@ -48,7 +48,7 @@
/* Always force the list to the expected size. */
-#define FIX_PREALLOC_SIZE(list) Py_SIZE(list) = count
+#define FIX_PREALLOC_SIZE(list) Py_SET_SIZE(list, count)
Py_LOCAL_INLINE(PyObject *)
STRINGLIB(split_whitespace)(PyObject* str_obj,