diff options
author | Victor Stinner <vstinner@python.org> | 2020-02-07 08:17:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 08:17:07 (GMT) |
commit | d2ec81a8c99796b51fb8c49b77a7fe369863226f (patch) | |
tree | d88e7cbe89f65366d5591338fbe59a71192950db /Objects/moduleobject.c | |
parent | daa9756cb6395323d6f291efe5c7d7fdc6b2e9d8 (diff) | |
download | cpython-d2ec81a8c99796b51fb8c49b77a7fe369863226f.zip cpython-d2ec81a8c99796b51fb8c49b77a7fe369863226f.tar.gz cpython-d2ec81a8c99796b51fb8c49b77a7fe369863226f.tar.bz2 |
bpo-39573: Add Py_SET_TYPE() function (GH-18394)
Add Py_SET_TYPE() function to set the type 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 da329b4..0a59326 100644 --- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -52,7 +52,7 @@ PyModuleDef_Init(struct PyModuleDef* def) if (def->m_base.m_index == 0) { max_module_number++; Py_SET_REFCNT(def, 1); - Py_TYPE(def) = &PyModuleDef_Type; + Py_SET_TYPE(def, &PyModuleDef_Type); def->m_base.m_index = max_module_number; } return (PyObject*)def; |