Commit a84dcd75 authored by Neal Norwitz's avatar Neal Norwitz

Stop using METH_OLDARGS implicitly

parent e2e447b6
...@@ -1299,7 +1299,7 @@ static PyObject * ...@@ -1299,7 +1299,7 @@ static PyObject *
PyCursesWindow_RedrawLine(PyCursesWindowObject *self, PyObject *args) PyCursesWindow_RedrawLine(PyCursesWindowObject *self, PyObject *args)
{ {
int beg, num; int beg, num;
if (!PyArg_ParseTuple(args,"ii;beg,num", &beg, &num)) if (!PyArg_ParseTuple(args, "ii;beg,num", &beg, &num))
return NULL; return NULL;
return PyCursesCheckERR(wredrawln(self->win,beg,num), "redrawln"); return PyCursesCheckERR(wredrawln(self->win,beg,num), "redrawln");
} }
...@@ -1533,7 +1533,7 @@ static PyMethodDef PyCursesWindow_Methods[] = { ...@@ -1533,7 +1533,7 @@ static PyMethodDef PyCursesWindow_Methods[] = {
{"overwrite", (PyCFunction)PyCursesWindow_Overwrite, {"overwrite", (PyCFunction)PyCursesWindow_Overwrite,
METH_VARARGS}, METH_VARARGS},
{"putwin", (PyCFunction)PyCursesWindow_PutWin, METH_VARARGS}, {"putwin", (PyCFunction)PyCursesWindow_PutWin, METH_VARARGS},
{"redrawln", (PyCFunction)PyCursesWindow_RedrawLine}, {"redrawln", (PyCFunction)PyCursesWindow_RedrawLine, METH_VARARGS},
{"redrawwin", (PyCFunction)PyCursesWindow_redrawwin, METH_NOARGS}, {"redrawwin", (PyCFunction)PyCursesWindow_redrawwin, METH_NOARGS},
{"refresh", (PyCFunction)PyCursesWindow_Refresh, METH_VARARGS}, {"refresh", (PyCFunction)PyCursesWindow_Refresh, METH_VARARGS},
#ifndef STRICT_SYSV_CURSES #ifndef STRICT_SYSV_CURSES
......
...@@ -1789,7 +1789,7 @@ static struct PyMethodDef s_methods[] = { ...@@ -1789,7 +1789,7 @@ static struct PyMethodDef s_methods[] = {
{"pack", s_pack, METH_VARARGS, s_pack__doc__}, {"pack", s_pack, METH_VARARGS, s_pack__doc__},
{"pack_into", s_pack_into, METH_VARARGS, s_pack_into__doc__}, {"pack_into", s_pack_into, METH_VARARGS, s_pack_into__doc__},
{"unpack", s_unpack, METH_O, s_unpack__doc__}, {"unpack", s_unpack, METH_O, s_unpack__doc__},
{"unpack_from", (PyCFunction)s_unpack_from, METH_KEYWORDS, {"unpack_from", (PyCFunction)s_unpack_from, METH_VARARGS|METH_KEYWORDS,
s_unpack_from__doc__}, s_unpack_from__doc__},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
......
...@@ -2631,7 +2631,7 @@ static PyMethodDef date_methods[] = { ...@@ -2631,7 +2631,7 @@ static PyMethodDef date_methods[] = {
{"ctime", (PyCFunction)date_ctime, METH_NOARGS, {"ctime", (PyCFunction)date_ctime, METH_NOARGS,
PyDoc_STR("Return ctime() style string.")}, PyDoc_STR("Return ctime() style string.")},
{"strftime", (PyCFunction)date_strftime, METH_KEYWORDS, {"strftime", (PyCFunction)date_strftime, METH_VARARGS | METH_KEYWORDS,
PyDoc_STR("format -> strftime() style string.")}, PyDoc_STR("format -> strftime() style string.")},
{"timetuple", (PyCFunction)date_timetuple, METH_NOARGS, {"timetuple", (PyCFunction)date_timetuple, METH_NOARGS,
...@@ -2656,7 +2656,7 @@ static PyMethodDef date_methods[] = { ...@@ -2656,7 +2656,7 @@ static PyMethodDef date_methods[] = {
PyDoc_STR("Return the day of the week represented by the date.\n" PyDoc_STR("Return the day of the week represented by the date.\n"
"Monday == 0 ... Sunday == 6")}, "Monday == 0 ... Sunday == 6")},
{"replace", (PyCFunction)date_replace, METH_KEYWORDS, {"replace", (PyCFunction)date_replace, METH_VARARGS | METH_KEYWORDS,
PyDoc_STR("Return date with new specified fields.")}, PyDoc_STR("Return date with new specified fields.")},
{"__reduce__", (PyCFunction)date_reduce, METH_NOARGS, {"__reduce__", (PyCFunction)date_reduce, METH_NOARGS,
...@@ -3417,7 +3417,7 @@ static PyMethodDef time_methods[] = { ...@@ -3417,7 +3417,7 @@ static PyMethodDef time_methods[] = {
PyDoc_STR("Return string in ISO 8601 format, HH:MM:SS[.mmmmmm]" PyDoc_STR("Return string in ISO 8601 format, HH:MM:SS[.mmmmmm]"
"[+HH:MM].")}, "[+HH:MM].")},
{"strftime", (PyCFunction)time_strftime, METH_KEYWORDS, {"strftime", (PyCFunction)time_strftime, METH_VARARGS | METH_KEYWORDS,
PyDoc_STR("format -> strftime() style string.")}, PyDoc_STR("format -> strftime() style string.")},
{"utcoffset", (PyCFunction)time_utcoffset, METH_NOARGS, {"utcoffset", (PyCFunction)time_utcoffset, METH_NOARGS,
...@@ -3429,7 +3429,7 @@ static PyMethodDef time_methods[] = { ...@@ -3429,7 +3429,7 @@ static PyMethodDef time_methods[] = {
{"dst", (PyCFunction)time_dst, METH_NOARGS, {"dst", (PyCFunction)time_dst, METH_NOARGS,
PyDoc_STR("Return self.tzinfo.dst(self).")}, PyDoc_STR("Return self.tzinfo.dst(self).")},
{"replace", (PyCFunction)time_replace, METH_KEYWORDS, {"replace", (PyCFunction)time_replace, METH_VARARGS | METH_KEYWORDS,
PyDoc_STR("Return time with new specified fields.")}, PyDoc_STR("Return time with new specified fields.")},
{"__reduce__", (PyCFunction)time_reduce, METH_NOARGS, {"__reduce__", (PyCFunction)time_reduce, METH_NOARGS,
...@@ -4468,7 +4468,7 @@ static PyMethodDef datetime_methods[] = { ...@@ -4468,7 +4468,7 @@ static PyMethodDef datetime_methods[] = {
/* Class methods: */ /* Class methods: */
{"now", (PyCFunction)datetime_now, {"now", (PyCFunction)datetime_now,
METH_KEYWORDS | METH_CLASS, METH_VARARGS | METH_KEYWORDS | METH_CLASS,
PyDoc_STR("[tz] -> new datetime with tz's local day and time.")}, PyDoc_STR("[tz] -> new datetime with tz's local day and time.")},
{"utcnow", (PyCFunction)datetime_utcnow, {"utcnow", (PyCFunction)datetime_utcnow,
...@@ -4476,7 +4476,7 @@ static PyMethodDef datetime_methods[] = { ...@@ -4476,7 +4476,7 @@ static PyMethodDef datetime_methods[] = {
PyDoc_STR("Return a new datetime representing UTC day and time.")}, PyDoc_STR("Return a new datetime representing UTC day and time.")},
{"fromtimestamp", (PyCFunction)datetime_fromtimestamp, {"fromtimestamp", (PyCFunction)datetime_fromtimestamp,
METH_KEYWORDS | METH_CLASS, METH_VARARGS | METH_KEYWORDS | METH_CLASS,
PyDoc_STR("timestamp[, tz] -> tz's local time from POSIX timestamp.")}, PyDoc_STR("timestamp[, tz] -> tz's local time from POSIX timestamp.")},
{"utcfromtimestamp", (PyCFunction)datetime_utcfromtimestamp, {"utcfromtimestamp", (PyCFunction)datetime_utcfromtimestamp,
...@@ -4513,7 +4513,7 @@ static PyMethodDef datetime_methods[] = { ...@@ -4513,7 +4513,7 @@ static PyMethodDef datetime_methods[] = {
{"utctimetuple", (PyCFunction)datetime_utctimetuple, METH_NOARGS, {"utctimetuple", (PyCFunction)datetime_utctimetuple, METH_NOARGS,
PyDoc_STR("Return UTC time tuple, compatible with time.localtime().")}, PyDoc_STR("Return UTC time tuple, compatible with time.localtime().")},
{"isoformat", (PyCFunction)datetime_isoformat, METH_KEYWORDS, {"isoformat", (PyCFunction)datetime_isoformat, METH_VARARGS | METH_KEYWORDS,
PyDoc_STR("[sep] -> string in ISO 8601 format, " PyDoc_STR("[sep] -> string in ISO 8601 format, "
"YYYY-MM-DDTHH:MM:SS[.mmmmmm][+HH:MM].\n\n" "YYYY-MM-DDTHH:MM:SS[.mmmmmm][+HH:MM].\n\n"
"sep is used to separate the year from the time, and " "sep is used to separate the year from the time, and "
...@@ -4528,10 +4528,10 @@ static PyMethodDef datetime_methods[] = { ...@@ -4528,10 +4528,10 @@ static PyMethodDef datetime_methods[] = {
{"dst", (PyCFunction)datetime_dst, METH_NOARGS, {"dst", (PyCFunction)datetime_dst, METH_NOARGS,
PyDoc_STR("Return self.tzinfo.dst(self).")}, PyDoc_STR("Return self.tzinfo.dst(self).")},
{"replace", (PyCFunction)datetime_replace, METH_KEYWORDS, {"replace", (PyCFunction)datetime_replace, METH_VARARGS | METH_KEYWORDS,
PyDoc_STR("Return datetime with new specified fields.")}, PyDoc_STR("Return datetime with new specified fields.")},
{"astimezone", (PyCFunction)datetime_astimezone, METH_KEYWORDS, {"astimezone", (PyCFunction)datetime_astimezone, METH_VARARGS | METH_KEYWORDS,
PyDoc_STR("tz -> convert to local time in new timezone tz\n")}, PyDoc_STR("tz -> convert to local time in new timezone tz\n")},
{"__reduce__", (PyCFunction)datetime_reduce, METH_NOARGS, {"__reduce__", (PyCFunction)datetime_reduce, METH_NOARGS,
......
...@@ -4259,7 +4259,7 @@ tp_new_wrapper(PyObject *self, PyObject *args, PyObject *kwds) ...@@ -4259,7 +4259,7 @@ tp_new_wrapper(PyObject *self, PyObject *args, PyObject *kwds)
} }
static struct PyMethodDef tp_new_methoddef[] = { static struct PyMethodDef tp_new_methoddef[] = {
{"__new__", (PyCFunction)tp_new_wrapper, METH_KEYWORDS, {"__new__", (PyCFunction)tp_new_wrapper, METH_VARARGS|METH_KEYWORDS,
PyDoc_STR("T.__new__(S, ...) -> " PyDoc_STR("T.__new__(S, ...) -> "
"a new object with type S, a subtype of T")}, "a new object with type S, a subtype of T")},
{0} {0}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment