gh-111178: Fix type of PyCMethod's "nargs" argument (GH-131135)

Replace "size_t nargs" with "Py_ssize_t nargs" in PyCMethod.
This commit is contained in:
Victor Stinner 2025-03-12 11:54:02 +01:00 committed by GitHub
parent e0637cebe5
commit 4dcbe06fd2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -24,7 +24,7 @@ typedef PyObject *(*PyCFunctionFastWithKeywords) (PyObject *,
PyObject *const *, Py_ssize_t,
PyObject *);
typedef PyObject *(*PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *,
size_t, PyObject *);
Py_ssize_t, PyObject *);
// For backwards compatibility. `METH_FASTCALL` was added to the stable API in
// 3.10 alongside `_PyCFunctionFastWithKeywords` and `_PyCFunctionFast`.

View File

@ -0,0 +1,2 @@
Fix :c:type:`PyCMethod` API: replace ``size_t nargs`` with ``Py_ssize_t nargs``
in :c:type:`PyCMethod`. Patch by Victor Stinner.