summaryrefslogtreecommitdiffstats
path: root/Python/ceval_macros.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2023-02-08 19:40:10 (GMT)
committerGitHub <noreply@github.com>2023-02-08 19:40:10 (GMT)
commit616aec1ff148ba4570aa2d4b8ea420c715c206e4 (patch)
treea3a7dcdbe60264dd511b01e5b0ff3cda9ecb6b66 /Python/ceval_macros.h
parentd9de0792482d2ded364b0c7d2867b97a5da41b12 (diff)
downloadcpython-616aec1ff148ba4570aa2d4b8ea420c715c206e4.zip
cpython-616aec1ff148ba4570aa2d4b8ea420c715c206e4.tar.gz
cpython-616aec1ff148ba4570aa2d4b8ea420c715c206e4.tar.bz2
gh-98831: Modernize CALL and family (#101508)
Includes a slight improvement to `DECREF_INPUTS()`.
Diffstat (limited to 'Python/ceval_macros.h')
-rw-r--r--Python/ceval_macros.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/ceval_macros.h b/Python/ceval_macros.h
index d7a8f0b..691bf8e 100644
--- a/Python/ceval_macros.h
+++ b/Python/ceval_macros.h
@@ -347,3 +347,6 @@ GETITEM(PyObject *v, Py_ssize_t i) {
} while (0);
#define NAME_ERROR_MSG "name '%.200s' is not defined"
+
+#define KWNAMES_LEN() \
+ (kwnames == NULL ? 0 : ((int)PyTuple_GET_SIZE(kwnames)))