summaryrefslogtreecommitdiffstats
path: root/Modules/_queuemodule.c
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na92@gmail.com>2020-03-24 22:08:51 (GMT)
committerGitHub <noreply@github.com>2020-03-24 22:08:51 (GMT)
commit37fcbb65d4589fbb5a72153e9338cf8e6495f64f (patch)
treee0c1e2f0b9d5673779ec74b71fef3fc158158ae1 /Modules/_queuemodule.c
parent15e5024d04fc89d948ae761d88048bc58a56b650 (diff)
downloadcpython-37fcbb65d4589fbb5a72153e9338cf8e6495f64f.zip
cpython-37fcbb65d4589fbb5a72153e9338cf8e6495f64f.tar.gz
cpython-37fcbb65d4589fbb5a72153e9338cf8e6495f64f.tar.bz2
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().
Diffstat (limited to 'Modules/_queuemodule.c')
-rw-r--r--Modules/_queuemodule.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/_queuemodule.c b/Modules/_queuemodule.c
index e033da5..5eef062 100644
--- a/Modules/_queuemodule.c
+++ b/Modules/_queuemodule.c
@@ -390,11 +390,9 @@ PyInit__queue(void)
if (PyModule_AddObject(m, "Empty", EmptyError) < 0)
return NULL;
- if (PyType_Ready(&PySimpleQueueType) < 0)
- return NULL;
- Py_INCREF(&PySimpleQueueType);
- if (PyModule_AddObject(m, "SimpleQueue", (PyObject *)&PySimpleQueueType) < 0)
+ if (PyModule_AddType(m, &PySimpleQueueType) < 0) {
return NULL;
+ }
return m;
}