[issue39611] PyVectorcall_NARGS(): change return type to Py_ssize_t

Petr Viktorin report at bugs.python.org
Tue Feb 18 07:10:14 EST 2020


Petr Viktorin <encukou at gmail.com> added the comment:

The current return type already is Py_ssize_t, exactly for the reason you mention – compatibility with all other "argument count" values in Python. (It would be more correct to use unsigned, but that ship has sailed.)

The *argument* type is unsigned size_t, though: unsigned is the correct type for for bit fields. Also, the "nargsf" value should never be directly used as argument count; making it a different type tends to trigger nice compiler warnings.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39611>
_______________________________________


More information about the Python-bugs-list mailing list