summaryrefslogtreecommitdiffstats
path: root/Include/py_curses.h
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-05-10 08:27:23 (GMT)
committerGitHub <noreply@github.com>2018-05-10 08:27:23 (GMT)
commitb00854caa080cec613496d3a5e1b0891c9ff83e6 (patch)
tree7d46b563232b3f3e6d99ed8bee0134f3fe084f03 /Include/py_curses.h
parentd518d8bc8d5dac1a1270612f424d33e0e5afc2b5 (diff)
downloadcpython-b00854caa080cec613496d3a5e1b0891c9ff83e6.zip
cpython-b00854caa080cec613496d3a5e1b0891c9ff83e6.tar.gz
cpython-b00854caa080cec613496d3a5e1b0891c9ff83e6.tar.bz2
bpo-20171: Convert the _curses and _curses_panel modules to Argument Clinic. (GH-4251)
Diffstat (limited to 'Include/py_curses.h')
-rw-r--r--Include/py_curses.h59
1 files changed, 0 insertions, 59 deletions
diff --git a/Include/py_curses.h b/Include/py_curses.h
index 0eebc36..2702b37 100644
--- a/Include/py_curses.h
+++ b/Include/py_curses.h
@@ -91,65 +91,6 @@ static void **PyCurses_API;
static const char catchall_ERR[] = "curses function returned ERR";
static const char catchall_NULL[] = "curses function returned NULL";
-/* Function Prototype Macros - They are ugly but very, very useful. ;-)
-
- X - function name
- TYPE - parameter Type
- ERGSTR - format string for construction of the return value
- PARSESTR - format string for argument parsing
- */
-
-#define NoArgNoReturnFunction(X) \
-static PyObject *PyCurses_ ## X (PyObject *self) \
-{ \
- PyCursesInitialised \
- return PyCursesCheckERR(X(), # X); }
-
-#define NoArgOrFlagNoReturnFunction(X) \
-static PyObject *PyCurses_ ## X (PyObject *self, PyObject *args) \
-{ \
- int flag = 0; \
- PyCursesInitialised \
- switch(PyTuple_Size(args)) { \
- case 0: \
- return PyCursesCheckERR(X(), # X); \
- case 1: \
- if (!PyArg_ParseTuple(args, "i;True(1) or False(0)", &flag)) return NULL; \
- if (flag) return PyCursesCheckERR(X(), # X); \
- else return PyCursesCheckERR(no ## X (), # X); \
- default: \
- PyErr_SetString(PyExc_TypeError, # X " requires 0 or 1 arguments"); \
- return NULL; } }
-
-#define NoArgReturnIntFunction(X) \
-static PyObject *PyCurses_ ## X (PyObject *self) \
-{ \
- PyCursesInitialised \
- return PyLong_FromLong((long) X()); }
-
-
-#define NoArgReturnStringFunction(X) \
-static PyObject *PyCurses_ ## X (PyObject *self) \
-{ \
- PyCursesInitialised \
- return PyBytes_FromString(X()); }
-
-#define NoArgTrueFalseFunction(X) \
-static PyObject *PyCurses_ ## X (PyObject *self) \
-{ \
- PyCursesInitialised \
- if (X () == FALSE) { \
- Py_RETURN_FALSE; \
- } \
- Py_RETURN_TRUE; }
-
-#define NoArgNoReturnVoidFunction(X) \
-static PyObject *PyCurses_ ## X (PyObject *self) \
-{ \
- PyCursesInitialised \
- X(); \
- Py_RETURN_NONE; }
-
#ifdef __cplusplus
}
#endif