@@ -2362,6 +2362,19 @@ meth_fastcall_keywords(PyObject* self, PyObject* const* args,
23622362 return Py_BuildValue ("NNN" , _null_to_none (self ), pyargs , pykwargs );
23632363}
23642364
2365+ static PyObject *
2366+ test_pycfunction_call (PyObject * module , PyObject * args )
2367+ {
2368+ // Function removed in the Python 3.13 API but was kept in the stable ABI.
2369+ extern PyObject * PyCFunction_Call (PyObject * callable , PyObject * args , PyObject * kwargs );
2370+
2371+ PyObject * func , * pos_args , * kwargs = NULL ;
2372+ if (!PyArg_ParseTuple (args , "OO!|O!" , & func , & PyTuple_Type , & pos_args , & PyDict_Type , & kwargs )) {
2373+ return NULL ;
2374+ }
2375+ return PyCFunction_Call (func , pos_args , kwargs );
2376+ }
2377+
23652378static PyObject *
23662379pynumber_tobase (PyObject * module , PyObject * args )
23672380{
@@ -3369,6 +3382,7 @@ static PyMethodDef TestMethods[] = {
33693382 {"meth_noargs" , meth_noargs , METH_NOARGS },
33703383 {"meth_fastcall" , _PyCFunction_CAST (meth_fastcall ), METH_FASTCALL },
33713384 {"meth_fastcall_keywords" , _PyCFunction_CAST (meth_fastcall_keywords ), METH_FASTCALL |METH_KEYWORDS },
3385+ {"pycfunction_call" , test_pycfunction_call , METH_VARARGS },
33723386 {"pynumber_tobase" , pynumber_tobase , METH_VARARGS },
33733387 {"test_set_type_size" , test_set_type_size , METH_NOARGS },
33743388 {"test_py_clear" , test_py_clear , METH_NOARGS },
0 commit comments