ffi cleanup: add missing deprecation
This commit is contained in:
parent
1fd86132e0
commit
6c3a241dd4
|
@ -71,6 +71,7 @@ extern "C" {
|
||||||
/// Helper initial value of [`PyGetSetDef`] for a Python class.
|
/// Helper initial value of [`PyGetSetDef`] for a Python class.
|
||||||
///
|
///
|
||||||
/// Not present in `cpython/Include/descrobject`.
|
/// Not present in `cpython/Include/descrobject`.
|
||||||
|
#[deprecated(note = "not present in Python headers; to be removed")]
|
||||||
pub const PyGetSetDef_INIT: PyGetSetDef = PyGetSetDef {
|
pub const PyGetSetDef_INIT: PyGetSetDef = PyGetSetDef {
|
||||||
name: ptr::null_mut(),
|
name: ptr::null_mut(),
|
||||||
get: None,
|
get: None,
|
||||||
|
|
|
@ -333,6 +333,7 @@ fn py_class_method_defs<T: PyMethods>() -> (
|
||||||
(new, call, defs)
|
(new, call, defs)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(deprecated)]
|
||||||
fn py_class_properties<T: PyClass>() -> Vec<ffi::PyGetSetDef> {
|
fn py_class_properties<T: PyClass>() -> Vec<ffi::PyGetSetDef> {
|
||||||
let mut defs = std::collections::HashMap::new();
|
let mut defs = std::collections::HashMap::new();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue