@@ -43,26 +43,34 @@ pub type PyCFunction =
4343 unsafe extern "C" fn ( slf : * mut PyObject , args : * mut PyObject ) -> * mut PyObject ;
4444
4545#[ cfg( any( Py_3_10 , not( Py_LIMITED_API ) ) ) ]
46- pub type _PyCFunctionFast = unsafe extern "C" fn (
46+ pub type PyCFunctionFast = unsafe extern "C" fn (
4747 slf : * mut PyObject ,
4848 args : * mut * mut PyObject ,
4949 nargs : crate :: pyport:: Py_ssize_t ,
5050) -> * mut PyObject ;
5151
52+ #[ cfg( any( Py_3_10 , not( Py_LIMITED_API ) ) ) ]
53+ #[ deprecated( note = "renamed to `PyCFunctionFast`" ) ]
54+ pub type _PyCFunctionFast = PyCFunctionFast ;
55+
5256pub type PyCFunctionWithKeywords = unsafe extern "C" fn (
5357 slf : * mut PyObject ,
5458 args : * mut PyObject ,
5559 kwds : * mut PyObject ,
5660) -> * mut PyObject ;
5761
58- #[ cfg( not( Py_LIMITED_API ) ) ]
59- pub type _PyCFunctionFastWithKeywords = unsafe extern "C" fn (
62+ #[ cfg( any ( Py_3_10 , not( Py_LIMITED_API ) ) ) ]
63+ pub type PyCFunctionFastWithKeywords = unsafe extern "C" fn (
6064 slf : * mut PyObject ,
6165 args : * const * mut PyObject ,
6266 nargs : crate :: pyport:: Py_ssize_t ,
6367 kwnames : * mut PyObject ,
6468) -> * mut PyObject ;
6569
70+ #[ cfg( any( Py_3_10 , not( Py_LIMITED_API ) ) ) ]
71+ #[ deprecated( note = "renamed to `PyCFunctionFastWithKeywords`" ) ]
72+ pub type _PyCFunctionFastWithKeywords = PyCFunctionFastWithKeywords ;
73+
6674#[ cfg( all( Py_3_9 , not( Py_LIMITED_API ) ) ) ]
6775pub type PyCMethod = unsafe extern "C" fn (
6876 slf : * mut PyObject ,
@@ -144,11 +152,21 @@ pub union PyMethodDefPointer {
144152
145153 /// This variant corresponds with [`METH_FASTCALL`].
146154 #[ cfg( any( Py_3_10 , not( Py_LIMITED_API ) ) ) ]
147- pub _PyCFunctionFast : _PyCFunctionFast ,
155+ #[ deprecated( note = "renamed to `PyCFunctionFast`" ) ]
156+ pub _PyCFunctionFast : PyCFunctionFast ,
157+
158+ /// This variant corresponds with [`METH_FASTCALL`].
159+ #[ cfg( any( Py_3_10 , not( Py_LIMITED_API ) ) ) ]
160+ pub PyCFunctionFast : PyCFunctionFast ,
161+
162+ /// This variant corresponds with [`METH_FASTCALL`] | [`METH_KEYWORDS`].
163+ #[ cfg( any( Py_3_10 , not( Py_LIMITED_API ) ) ) ]
164+ #[ deprecated( note = "renamed to `PyCFunctionFastWithKeywords`" ) ]
165+ pub _PyCFunctionFastWithKeywords : PyCFunctionFastWithKeywords ,
148166
149167 /// This variant corresponds with [`METH_FASTCALL`] | [`METH_KEYWORDS`].
150- #[ cfg( not( Py_LIMITED_API ) ) ]
151- pub _PyCFunctionFastWithKeywords : _PyCFunctionFastWithKeywords ,
168+ #[ cfg( any ( Py_3_10 , not( Py_LIMITED_API ) ) ) ]
169+ pub PyCFunctionFastWithKeywords : PyCFunctionFastWithKeywords ,
152170
153171 /// This variant corresponds with [`METH_METHOD`] | [`METH_FASTCALL`] | [`METH_KEYWORDS`].
154172 #[ cfg( all( Py_3_9 , not( Py_LIMITED_API ) ) ) ]
0 commit comments