diff options
author | Dong-hee Na <donghee.na92@gmail.com> | 2020-03-25 07:08:51 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-24 23:08:51 +0100 |
commit | 37fcbb65d4589fbb5a72153e9338cf8e6495f64f (patch) | |
tree | e0c1e2f0b9d5673779ec74b71fef3fc158158ae1 /Modules/_cursesmodule.c | |
parent | 15e5024d04fc89d948ae761d88048bc58a56b650 (diff) | |
download | cpython-git-37fcbb65d4589fbb5a72153e9338cf8e6495f64f.tar.gz |
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/_cursesmodule.c')
-rw-r--r-- | Modules/_cursesmodule.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index ee33107ed6..3d16af7f0a 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -4740,7 +4740,8 @@ PyInit__curses(void) SetDictInt("KEY_MAX", KEY_MAX); } - Py_INCREF(&PyCursesWindow_Type); - PyModule_AddObject(m, "window", (PyObject *)&PyCursesWindow_Type); + if (PyModule_AddType(m, &PyCursesWindow_Type) < 0) { + return NULL; + } return m; } |