mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
lift the =dup hook (#21903)
* fixes tests again * remove helper functions * fixes closures, owned refs * final cleanup
This commit is contained in:
@@ -200,10 +200,6 @@ proc nimDecRefIsLast(p: pointer): bool {.compilerRtl, inl.} =
|
||||
when traceCollector:
|
||||
cprintf("[DECREF] %p\n", cell)
|
||||
|
||||
proc nimDupRef(dest: ptr pointer, src: pointer) {.compilerRtl, inl.} =
|
||||
dest[] = src
|
||||
if src != nil: nimIncRef src
|
||||
|
||||
proc GC_unref*[T](x: ref T) =
|
||||
## New runtime only supports this operation for 'ref T'.
|
||||
var y {.cursor.} = x
|
||||
|
||||
Reference in New Issue
Block a user