system.nim deprecate 'getRefcount'; refs #2839, refs #3713

This commit is contained in:
Araq
2018-10-15 10:54:20 +02:00
parent 37986d0ba8
commit 8252c65cf2

View File

@@ -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.