diff options
author | Victor Stinner <vstinner@python.org> | 2020-02-07 00:24:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 00:24:29 (GMT) |
commit | c86a11221df7e37da389f9c6ce6e47ea22dc44ff (patch) | |
tree | c27a35a01bde1554488268dd3bbeb8b4c46e193c /Objects/moduleobject.c | |
parent | a93c51e3a8e15f1a486d11d5b55a64f3381babe0 (diff) | |
download | cpython-c86a11221df7e37da389f9c6ce6e47ea22dc44ff.zip cpython-c86a11221df7e37da389f9c6ce6e47ea22dc44ff.tar.gz cpython-c86a11221df7e37da389f9c6ce6e47ea22dc44ff.tar.bz2 |
bpo-39573: Add Py_SET_REFCNT() function (GH-18389)
Add a Py_SET_REFCNT() function to set the reference counter of an
object.
Diffstat (limited to 'Objects/moduleobject.c')
-rw-r--r-- | Objects/moduleobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c index 49cfd57..da329b4 100644 --- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -51,7 +51,7 @@ PyModuleDef_Init(struct PyModuleDef* def) return NULL; if (def->m_base.m_index == 0) { max_module_number++; - Py_REFCNT(def) = 1; + Py_SET_REFCNT(def, 1); Py_TYPE(def) = &PyModuleDef_Type; def->m_base.m_index = max_module_number; } |