summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapimodule.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-02-07 08:17:07 (GMT)
committerGitHub <noreply@github.com>2020-02-07 08:17:07 (GMT)
commitd2ec81a8c99796b51fb8c49b77a7fe369863226f (patch)
treed88e7cbe89f65366d5591338fbe59a71192950db /Modules/_testcapimodule.c
parentdaa9756cb6395323d6f291efe5c7d7fdc6b2e9d8 (diff)
downloadcpython-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 'Modules/_testcapimodule.c')
-rw-r--r--Modules/_testcapimodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 3bb1bf1..e6d3034 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -6605,9 +6605,9 @@ PyInit__testcapi(void)
if (m == NULL)
return NULL;
- Py_TYPE(&_HashInheritanceTester_Type)=&PyType_Type;
+ Py_SET_TYPE(&_HashInheritanceTester_Type, &PyType_Type);
- Py_TYPE(&test_structmembersType)=&PyType_Type;
+ Py_SET_TYPE(&test_structmembersType, &PyType_Type);
Py_INCREF(&test_structmembersType);
/* don't use a name starting with "test", since we don't want
test_capi to automatically call this */