From 412335935d0c5b95dc81d0efa3e64906f7138d1e Mon Sep 17 00:00:00 2001 From: araq Date: Sun, 8 Feb 2026 00:56:43 +0100 Subject: [PATCH] bugfix --- lib/system/arc.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/system/arc.nim b/lib/system/arc.nim index 31f0039850..3ac84be3bb 100644 --- a/lib/system/arc.nim +++ b/lib/system/arc.nim @@ -74,7 +74,7 @@ elif defined(nimArcIds): const traceId = -1 -when defined(gcAtomicArc) and hasThreadSupport: +when (defined(gcAtomicArc) or defined(gcYrc)) and hasThreadSupport: template decrement(cell: Cell): untyped = discard atomicDec(cell.rc, rcIncrement) template increment(cell: Cell): untyped = @@ -227,7 +227,7 @@ proc nimDecRefIsLast(p: pointer): bool {.compilerRtl, inl.} = writeStackTrace() cfprintf(cstderr, "[DecRef] %p %ld\n", p, cell.count) - when defined(gcAtomicArc) and hasThreadSupport: + when (defined(gcAtomicArc) or defined(gcYrc)) and hasThreadSupport: # `atomicDec` returns the new value if atomicDec(cell.rc, rcIncrement) == -rcIncrement: result = true