diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-02-06 08:41:46 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-02-06 08:41:46 (GMT) |
commit | 68a001dd59e2f0c00cb703200e801d0e6be63546 (patch) | |
tree | 78bbb59644b34629569a2f2ccaa2ce40dd48dbb8 /Include | |
parent | 6aee6fbce8f3d7b8c8eae5d8f88fc2282698a6dc (diff) | |
download | cpython-68a001dd59e2f0c00cb703200e801d0e6be63546.zip cpython-68a001dd59e2f0c00cb703200e801d0e6be63546.tar.gz cpython-68a001dd59e2f0c00cb703200e801d0e6be63546.tar.bz2 |
Issue #29460: _PyArg_NoKeywords(), _PyArg_NoStackKeywords() and
_PyArg_NoPositional() now are macros.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/modsupport.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Include/modsupport.h b/Include/modsupport.h index 7f4160e..853860f 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); |