We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e54c53c commit df9a455Copy full SHA for df9a455
pyo3-ffi/src/object.rs
@@ -650,7 +650,16 @@ pub unsafe fn Py_INCREF(op: *mut PyObject) {
650
GraalPy
651
)))]
652
{
653
- #[cfg(all(Py_3_12, target_pointer_width = "64"))]
+ #[cfg(all(Py_3_14, target_pointer_width = "64"))]
654
+ {
655
+ let cur_refcnt = (*op).ob_refcnt.ob_refcnt;
656
+ if (cur_refcnt as i32) < 0 {
657
+ return;
658
+ }
659
+ (*op).ob_refcnt.ob_refcnt = cur_refcnt.wrapping_add(1);
660
661
+
662
+ #[cfg(all(Py_3_12, not(Py_3_14), target_pointer_width = "64"))]
663
664
let cur_refcnt = (*op).ob_refcnt.ob_refcnt_split[crate::PY_BIG_ENDIAN];
665
let new_refcnt = cur_refcnt.wrapping_add(1);
0 commit comments