Skip to content

Commit ff64806

Browse files
committed
bpo-40024: Update _cursesmodule to use PyModule_AddType.
1 parent 95ea687 commit ff64806

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Modules/_cursesmodule.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4740,7 +4740,8 @@ PyInit__curses(void)
47404740
SetDictInt("KEY_MAX", KEY_MAX);
47414741
}
47424742

4743-
Py_INCREF(&PyCursesWindow_Type);
4744-
PyModule_AddObject(m, "window", (PyObject *)&PyCursesWindow_Type);
4743+
if (PyModule_AddType(m, &PyCursesWindow_Type) < 0) {
4744+
return NULL;
4745+
}
47454746
return m;
47464747
}

0 commit comments

Comments
 (0)