summaryrefslogtreecommitdiff
path: root/Include/modsupport.h
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-02-06 10:41:46 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2017-02-06 10:41:46 +0200
commit54ab9ca906471f8a49e22c7f85d4f34c2ef7212c (patch)
treee52219261fbd532e701813327faf7dc4c035aa5e /Include/modsupport.h
parent1ebed331c127c8ca4a279c5121cfd4a9de3cfda8 (diff)
downloadcpython-54ab9ca906471f8a49e22c7f85d4f34c2ef7212c.tar.gz
Issue #29460: _PyArg_NoKeywords(), _PyArg_NoStackKeywords() and
_PyArg_NoPositional() now are macros.
Diffstat (limited to 'Include/modsupport.h')
-rw-r--r--Include/modsupport.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Include/modsupport.h b/Include/modsupport.h
index 7f4160e5ba..853860f4d2 100644
--- a/Include/modsupport.h
+++ b/Include/modsupport.h
@@ -62,6 +62,13 @@ PyAPI_FUNC(int) _PyArg_UnpackStack(
PyAPI_FUNC(int) _PyArg_NoKeywords(const char *funcname, PyObject *kwargs);
PyAPI_FUNC(int) _PyArg_NoStackKeywords(const char *funcname, PyObject *kwnames);
PyAPI_FUNC(int) _PyArg_NoPositional(const char *funcname, PyObject *args);
+#define _PyArg_NoKeywords(funcname, kwargs) \
+ ((kwargs) == NULL || _PyArg_NoKeywords((funcname), (kwargs)))
+#define _PyArg_NoStackKeywords(funcname, kwnames) \
+ ((kwnames) == NULL || _PyArg_NoStackKeywords((funcname), (kwnames)))
+#define _PyArg_NoPositional(funcname, args) \
+ ((args) == NULL || _PyArg_NoPositional((funcname), (args)))
+
#endif
PyAPI_FUNC(PyObject *) Py_VaBuildValue(const char *, va_list);