Skip to content

Commit

Permalink
Use Python 3.13a4 PyCFunctionFastWithKeywords
Browse files Browse the repository at this point in the history
Python 3.13a4 adds a public PyCFunctionFastWithKeywords and
PyCFunctionFast types and removes the private
_PyCFunctionFastWithKeywords and _PyCFunctionFast types:

* python/cpython@9e3729b
* python/cpython#114627
* capi-workgroup/decisions#11
  • Loading branch information
vstinner committed Feb 16, 2024
1 parent a8b26e9 commit 8296114
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cython/Utility/CythonFunction.c
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func,
return NULL;
}

return ((_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
}

static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
Expand Down
9 changes: 7 additions & 2 deletions Cython/Utility/ModuleSetupCode.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,8 +907,13 @@ class __Pyx_FakeReference {
typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
Py_ssize_t nargs, PyObject *kwnames);
#else
#define __Pyx_PyCFunctionFast _PyCFunctionFast
#define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#if PY_VERSION_HEX >= 0x030d00A4
# define __Pyx_PyCFunctionFast PyCFunctionFast
# define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
#else
# define __Pyx_PyCFunctionFast _PyCFunctionFast
# define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#endif

#if CYTHON_METH_FASTCALL
Expand Down

0 comments on commit 8296114

Please sign in to comment.