From d0a817468a191f3a748e317426eee4c8b7eaae19 Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Thu, 13 Jun 2019 22:06:26 +0100 Subject: [PATCH] PEP 590: Correct sign of return value of PyVectorcall_NARGS(). --- pep-0590.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pep-0590.rst b/pep-0590.rst index fee20ee15ab..2e06666a9b6 100644 --- a/pep-0590.rst +++ b/pep-0590.rst @@ -129,7 +129,7 @@ so it can use this trick at no additional cost. See [3]_ for an example of how ``PY_VECTORCALL_ARGUMENTS_OFFSET`` is used by a callee to avoid allocation. For getting the actual number of arguments from the parameter ``n``, -the macro ``PyVectorcall_NARGS(n)`` must be used. +the inline function ``PyVectorcall_NARGS(n)`` must be used. This allows for future changes or extensions. @@ -152,7 +152,7 @@ The following functions or macros are added to the C API: ``*args`` and ``**kwargs`` calling convention. This is mostly meant to put in the ``tp_call`` slot. -- ``Py_ssize_t PyVectorcall_NARGS(size_t nargs)``: Given a vectorcall ``nargs`` argument, +- ``size_t PyVectorcall_NARGS(size_t nargs)``: Given a vectorcall ``nargs`` argument, return the actual number of arguments. Currently equivalent to ``nargs & ~PY_VECTORCALL_ARGUMENTS_OFFSET``.