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 /Modules/_blake2 | |
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 'Modules/_blake2')
-rw-r--r-- | Modules/_blake2/blake2module.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_blake2/blake2module.c b/Modules/_blake2/blake2module.c index e2a3d42..9d280a9 100644 --- a/Modules/_blake2/blake2module.c +++ b/Modules/_blake2/blake2module.c @@ -62,7 +62,7 @@ PyInit__blake2(void) return NULL; /* BLAKE2b */ - Py_TYPE(&PyBlake2_BLAKE2bType) = &PyType_Type; + Py_SET_TYPE(&PyBlake2_BLAKE2bType, &PyType_Type); if (PyType_Ready(&PyBlake2_BLAKE2bType) < 0) { return NULL; } @@ -82,7 +82,7 @@ PyInit__blake2(void) PyModule_AddIntConstant(m, "BLAKE2B_MAX_DIGEST_SIZE", BLAKE2B_OUTBYTES); /* BLAKE2s */ - Py_TYPE(&PyBlake2_BLAKE2sType) = &PyType_Type; + Py_SET_TYPE(&PyBlake2_BLAKE2sType, &PyType_Type); if (PyType_Ready(&PyBlake2_BLAKE2sType) < 0) { return NULL; } |