mirror of
https://github.com/python/cpython.git
synced 2026-01-03 22:12:27 +00: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:
parent
4101018488
commit
993e88cf08
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue