mirror of
https://github.com/python/cpython.git
synced 2025-07-15 15:25:29 +00:00
bpo-39573: Add Py_SET_TYPE() function (GH-18394)
Add Py_SET_TYPE() function to set the type of an object.
This commit is contained in:
parent
daa9756cb6
commit
d2ec81a8c9
24 changed files with 77 additions and 48 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue