diff options
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 ee33107..3d16af7 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; } |