8000 bpo-1635741 port _curses_panel to multi-phase init (PEP 489) by koubaa · Pull Request #21986 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-1635741 port _curses_panel to multi-phase init (PEP 489) #21986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Sep 7, 2020
Prev Previous commit
Next Next commit
fix compiler warning
  • Loading branch information
koubaa committed Sep 7, 2020
commit f9b5d9fe71a55e18992b49fddfbd51c8a4c87198
11 changes: 5 a 8000 dditions & 6 deletions Modules/_curses_panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,11 +513,10 @@ static PyType_Slot PyCursesPanel_Type_slots[] = {
};

static PyType_Spec PyCursesPanel_Type_spec = {
"_curses_panel.panel",
sizeof(PyCursesPanelObject),
0,
Py_TPFLAGS_DEFAULT,
PyCursesPanel_Type_slots
.name = "_curses_panel.panel",
.basicsize = sizeof(PyCursesPanelObject),
.flags = Py_TPFLAGS_DEFAULT,
.slots = PyCursesPanel_Type_slots
};

/* Wrapper for panel_above(NULL). This function returns the bottom
Expand Down Expand Up @@ -649,7 +648,7 @@ _curses_exec(PyObject *m)
{
_curses_panelstate *state = get_curses_panelstate(m);
/* Initialize object type */
state->PyCursesPanel_Type = PyType_FromModuleAndSpec(
state->PyCursesPanel_Type = (PyTypeObject *)PyType_FromModuleAndSpec(
m, &PyCursesPanel_Type_spec, NULL);
if (state->PyCursesPanel_Type == NULL) {
return -1;
Expand Down
0