mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
bpo-42694: Prevent creating _curses_panel.panel (GH-23948)
Fix regression introduced in
commit 1baf030a90: restore removed code
to prevent creating a _curses_panel.panel instance directly.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user