bpo-40024: Update C extension modules to use PyModule_AddType() (GH-19119)

Update _asyncio, _bz2, _csv, _curses, _datetime,
_io, _operator, _pickle, _queue, blake2,
multibytecodec and overlapped C extension modules
to use PyModule_AddType().
This commit is contained in:
Dong-hee Na 2020-03-25 07:08:51 +09:00 committed by GitHub
parent 15e5024d04
commit 37fcbb65d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 66 additions and 133 deletions

View file

@ -1860,12 +1860,10 @@ PyInit__overlapped(void)
if (initialize_function_pointers() < 0)
return NULL;
if (PyType_Ready(&OverlappedType) < 0)
return NULL;
m = PyModule_Create(&overlapped_module);
if (PyModule_AddObject(m, "Overlapped", (PyObject *)&OverlappedType) < 0)
if (PyModule_AddType(m, &OverlappedType) < 0) {
return NULL;
}
d = PyModule_GetDict(m);