fix compile warning on pre-3.12 debug builds
This commit is contained in:
parent
82b1e55e2b
commit
7fce07935c
|
@ -0,0 +1 @@
|
|||
Fix compile warning for unreachable expression on debug builds before 3.12.
|
|
@ -500,9 +500,14 @@ pub unsafe fn Py_INCREF(op: *mut PyObject) {
|
|||
}
|
||||
|
||||
#[cfg(any(
|
||||
not(Py_LIMITED_API),
|
||||
all(Py_LIMITED_API, not(Py_3_12)),
|
||||
all(py_sys_config = "Py_REF_DEBUG", Py_3_12, not(Py_LIMITED_API))
|
||||
all(
|
||||
not(Py_LIMITED_API),
|
||||
any(
|
||||
not(py_sys_config = "Py_REF_DEBUG"),
|
||||
all(py_sys_config = "Py_REF_DEBUG", Py_3_12),
|
||||
)
|
||||
),
|
||||
))]
|
||||
{
|
||||
#[cfg(all(Py_3_12, target_pointer_width = "64"))]
|
||||
|
@ -560,9 +565,14 @@ pub unsafe fn Py_DECREF(op: *mut PyObject) {
|
|||
}
|
||||
|
||||
#[cfg(any(
|
||||
not(Py_LIMITED_API),
|
||||
all(Py_LIMITED_API, not(Py_3_12)),
|
||||
all(py_sys_config = "Py_REF_DEBUG", Py_3_12, not(Py_LIMITED_API))
|
||||
all(
|
||||
not(Py_LIMITED_API),
|
||||
any(
|
||||
not(py_sys_config = "Py_REF_DEBUG"),
|
||||
all(py_sys_config = "Py_REF_DEBUG", Py_3_12),
|
||||
)
|
||||
),
|
||||
))]
|
||||
{
|
||||
#[cfg(Py_3_12)]
|
||||
|
|
Loading…
Reference in New Issue