Skip to content

Commit f38c43a

Browse files
committed
revert removal of _Py_XNewRef and _Py_NewRef in 0.22 line
1 parent dbb33ad commit f38c43a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pyo3-ffi/src/object.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -655,8 +655,10 @@ extern "C" {
655655
pub fn Py_XNewRef(obj: *mut PyObject) -> *mut PyObject;
656656
}
657657

658-
// macro _Py_NewRef not public; reimplemented directly inside Py_NewRef here
659-
// macro _Py_XNewRef not public; reimplemented directly inside Py_XNewRef here
658+
// 0.22.3 backwards-compatibility exports these private FFI definitions; they will be removed
659+
// in 0.23.0
660+
pub use crate::compat::Py_NewRef as _Py_NewRef;
661+
pub use crate::compat::Py_XNewRef as _Py_XNewRef;
660662

661663
#[cfg(all(Py_3_10, any(not(Py_LIMITED_API), PyPy)))]
662664
#[cfg_attr(docsrs, doc(cfg(Py_3_10)))]

0 commit comments

Comments
 (0)