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/socketmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Modules/socketmodule.c') diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index e54f7a9b1c..37b312396f 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -7100,7 +7100,7 @@ PyInit__socket(void) } #endif - Py_TYPE(&sock_type) = &PyType_Type; + Py_SET_TYPE(&sock_type, &PyType_Type); m = PyModule_Create(&socketmodule); if (m == NULL) return NULL; -- cgit v1.2.1