summaryrefslogtreecommitdiffstats
path: root/Modules/_curses_panel.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2002-03-25 20:46:46 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2002-03-25 20:46:46 (GMT)
commit3a6f97850b2a4071f3015033fa3d68ce6fa576f4 (patch)
tree46311b5e874d4c733748e5a20de70336bf282323 /Modules/_curses_panel.c
parent57f8e06e4f797abe4d2cbb41a298c5541f69b7f6 (diff)
downloadcpython-3a6f97850b2a4071f3015033fa3d68ce6fa576f4.zip
cpython-3a6f97850b2a4071f3015033fa3d68ce6fa576f4.tar.gz
cpython-3a6f97850b2a4071f3015033fa3d68ce6fa576f4.tar.bz2
Remove many uses of PyArg_NoArgs macro, change METH_OLDARGS to METH_NOARGS.
Diffstat (limited to 'Modules/_curses_panel.c')
-rw-r--r--Modules/_curses_panel.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/Modules/_curses_panel.c b/Modules/_curses_panel.c
index 5736868..5603fe9 100644
--- a/Modules/_curses_panel.c
+++ b/Modules/_curses_panel.c
@@ -355,14 +355,12 @@ PyTypeObject PyCursesPanel_Type = {
panel.above() *requires* a panel object in the first place which
may be undesirable. */
static PyObject *
-PyCurses_bottom_panel(PyObject *self, PyObject *args)
+PyCurses_bottom_panel(PyObject *self)
{
PANEL *pan;
PyCursesPanelObject *po;
PyCursesInitialised;
-
- if (!PyArg_NoArgs(args)) return NULL;
pan = panel_above(NULL);
@@ -403,14 +401,12 @@ PyCurses_new_panel(PyObject *self, PyObject *args)
*requires* a panel object in the first place which may be
undesirable. */
static PyObject *
-PyCurses_top_panel(PyObject *self, PyObject *args)
+PyCurses_top_panel(PyObject *self)
{
PANEL *pan;
PyCursesPanelObject *po;
PyCursesInitialised;
-
- if (!PyArg_NoArgs(args)) return NULL;
pan = panel_below(NULL);
@@ -429,10 +425,9 @@ PyCurses_top_panel(PyObject *self, PyObject *args)
return (PyObject *)po;
}
-static PyObject *PyCurses_update_panels(PyObject *self, PyObject *args)
+static PyObject *PyCurses_update_panels(PyObject *self)
{
PyCursesInitialised;
- if (!PyArg_NoArgs(args)) return NULL;
update_panels();
Py_INCREF(Py_None);
return Py_None;
@@ -442,10 +437,10 @@ static PyObject *PyCurses_update_panels(PyObject *self, PyObject *args)
/* List of functions defined in the module */
static PyMethodDef PyCurses_methods[] = {
- {"bottom_panel", (PyCFunction)PyCurses_bottom_panel},
- {"new_panel", (PyCFunction)PyCurses_new_panel, METH_VARARGS},
- {"top_panel", (PyCFunction)PyCurses_top_panel},
- {"update_panels", (PyCFunction)PyCurses_update_panels},
+ {"bottom_panel", (PyCFunction)PyCurses_bottom_panel, METH_NOARGS},
+ {"new_panel", (PyCFunction)PyCurses_new_panel, METH_VARARGS},
+ {"top_panel", (PyCFunction)PyCurses_top_panel, METH_NOARGS},
+ {"update_panels", (PyCFunction)PyCurses_update_panels, METH_NOARGS},
{NULL, NULL} /* sentinel */
};