bpo-42694: Prevent creating _curses_panel.panel (GH-23948)
Fix regression introduced in commit 1baf030a902392fe92d934ed0fb6a385cf7d8869: restore removed code to prevent creating a _curses_panel.panel instance directly.
This commit is contained in:
parent
4101018488
commit
993e88cf08
|
@ -654,6 +654,7 @@ _curses_panel_exec(PyObject *mod)
|
|||
if (state->PyCursesPanel_Type == NULL) {
|
||||
return -1;
|
||||
}
|
||||
((PyTypeObject *)state->PyCursesPanel_Type)->tp_new = NULL;
|
||||
|
||||
if (PyModule_AddType(mod, state->PyCursesPanel_Type) < 0) {
|
||||
return -1;
|
||||
|
@ -715,4 +716,4 @@ PyMODINIT_FUNC
|
|||
PyInit__curses_panel(void)
|
||||
{
|
||||
return PyModuleDef_Init(&_curses_panelmodule);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue