From d2ec81a8c99796b51fb8c49b77a7fe369863226f Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 7 Feb 2020 09:17:07 +0100 Subject: bpo-39573: Add Py_SET_TYPE() function (GH-18394) Add Py_SET_TYPE() function to set the type of an object. --- Modules/_blake2/blake2module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Modules/_blake2/blake2module.c') diff --git a/Modules/_blake2/blake2module.c b/Modules/_blake2/blake2module.c index e2a3d420d4..9d280a9ccd 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; } -- cgit v1.2.1