mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
bpo-33012: Fix signatures of METH_NOARGS funstions. (GH-10736)
This commit is contained in:
parent
4a934d490f
commit
81524022d0
5 changed files with 15 additions and 15 deletions
|
|
@ -412,26 +412,26 @@ PyTypeObject PyCursesWindow_Type;
|
|||
PARSESTR - format string for argument parsing
|
||||
*/
|
||||
|
||||
#define Window_NoArgNoReturnFunction(X) \
|
||||
static PyObject *PyCursesWindow_ ## X \
|
||||
(PyCursesWindowObject *self, PyObject *args) \
|
||||
#define Window_NoArgNoReturnFunction(X) \
|
||||
static PyObject *PyCursesWindow_ ## X \
|
||||
(PyCursesWindowObject *self, PyObject *Py_UNUSED(ignored)) \
|
||||
{ return PyCursesCheckERR(X(self->win), # X); }
|
||||
|
||||
#define Window_NoArgTrueFalseFunction(X) \
|
||||
static PyObject * PyCursesWindow_ ## X \
|
||||
(PyCursesWindowObject *self) \
|
||||
(PyCursesWindowObject *self, PyObject *Py_UNUSED(ignored)) \
|
||||
{ \
|
||||
return PyBool_FromLong(X(self->win)); }
|
||||
|
||||
#define Window_NoArgNoReturnVoidFunction(X) \
|
||||
static PyObject * PyCursesWindow_ ## X \
|
||||
(PyCursesWindowObject *self) \
|
||||
(PyCursesWindowObject *self, PyObject *Py_UNUSED(ignored)) \
|
||||
{ \
|
||||
X(self->win); Py_RETURN_NONE; }
|
||||
|
||||
#define Window_NoArg2TupleReturnFunction(X, TYPE, ERGSTR) \
|
||||
static PyObject * PyCursesWindow_ ## X \
|
||||
(PyCursesWindowObject *self) \
|
||||
(PyCursesWindowObject *self, PyObject *Py_UNUSED(ignored)) \
|
||||
{ \
|
||||
TYPE arg1, arg2; \
|
||||
X(self->win,arg1,arg2); return Py_BuildValue(ERGSTR, arg1, arg2); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue