From 8252c65cf2501b8d6401e7d8295df374ef6b1994 Mon Sep 17 00:00:00 2001 From: Araq Date: Mon, 15 Oct 2018 10:54:20 +0200 Subject: system.nim deprecate 'getRefcount'; refs #2839, refs #3713 --- lib/system.nim | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/system.nim b/lib/system.nim index 449307af9..469f5cebe 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -2015,9 +2015,12 @@ proc `$`*[Enum: enum](x: Enum): string {.magic: "EnumToStr", noSideEffect.} ## used instead. (In other words: *Overwriting* is possible.) # undocumented: -proc getRefcount*[T](x: ref T): int {.importc: "getRefcount", noSideEffect.} -proc getRefcount*(x: string): int {.importc: "getRefcount", noSideEffect.} -proc getRefcount*[T](x: seq[T]): int {.importc: "getRefcount", noSideEffect.} +proc getRefcount*[T](x: ref T): int {.importc: "getRefcount", noSideEffect, + deprecated: "the refcount never was reliable, the GC does not use traditional refcounting".} +proc getRefcount*(x: string): int {.importc: "getRefcount", noSideEffect, + deprecated: "the refcount never was reliable, the GC does not use traditional refcounting".} +proc getRefcount*[T](x: seq[T]): int {.importc: "getRefcount", noSideEffect, + deprecated: "the refcount never was reliable, the GC does not use traditional refcounting".} ## retrieves the reference count of an heap-allocated object. The ## value is implementation-dependent. -- cgit 1.4.1-2-gfad0