From 90df6ea8e82ba08d00c7b24b38a7049e95b6032c Mon Sep 17 00:00:00 2001 From: Brandt Bucher Date: Wed, 12 Feb 2020 17:33:08 -0800 Subject: [PATCH 1/2] refcnt -> size --- Include/object.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Include/object.h b/Include/object.h index 68200f7666f170..11539ee080503d 100644 --- a/Include/object.h +++ b/Include/object.h @@ -133,10 +133,10 @@ static inline void _Py_SET_TYPE(PyObject *ob, PyTypeObject *type) { } #define Py_SET_TYPE(ob, type) _Py_SET_TYPE(_PyObject_CAST(ob), type) -static inline void _Py_SET_SIZE(PyVarObject *ob, Py_ssize_t refcnt) { - ob->ob_size = refcnt; +static inline void _Py_SET_SIZE(PyVarObject *ob, Py_ssize_t size) { + ob->ob_size = size; } -#define Py_SET_SIZE(ob, refcnt) _Py_SET_SIZE(_PyVarObject_CAST(ob), refcnt) +#define Py_SET_SIZE(ob, size) _Py_SET_SIZE(_PyVarObject_CAST(ob), size) /* From 6d4ee95f4021ccdcb48f708bf3ae3d184446d373 Mon Sep 17 00:00:00 2001 From: Brandt Bucher Date: Thu, 13 Feb 2020 08:56:49 -0800 Subject: [PATCH 2/2] to -> of --- Doc/c-api/structures.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst index 75e2383beb2160..083c3740531e4c 100644 --- a/Doc/c-api/structures.rst +++ b/Doc/c-api/structures.rst @@ -103,7 +103,7 @@ the definition of all other Python objects. .. c:function:: void Py_SET_SIZE(PyVarObject *o, Py_ssize_t size) - Set the object *o* size of *size*. + Set the object *o* size to *size*. .. versionadded:: 3.9