ffi cleanup: add missing deprecation

This commit is contained in:
Nicholas Sim 2020-12-28 20:55:23 +08:00
parent 1fd86132e0
commit 6c3a241dd4
2 changed files with 2 additions and 0 deletions

View File

@ -71,6 +71,7 @@ extern "C" {
/// Helper initial value of [`PyGetSetDef`] for a Python class.
///
/// Not present in `cpython/Include/descrobject`.
#[deprecated(note = "not present in Python headers; to be removed")]
pub const PyGetSetDef_INIT: PyGetSetDef = PyGetSetDef {
name: ptr::null_mut(),
get: None,

View File

@ -333,6 +333,7 @@ fn py_class_method_defs<T: PyMethods>() -> (
(new, call, defs)
}
#[allow(deprecated)]
fn py_class_properties<T: PyClass>() -> Vec<ffi::PyGetSetDef> {
let mut defs = std::collections::HashMap::new();