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

This commit is contained in:
Araq 2018-10-15 10:54:20 +02:00
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.) ## used instead. (In other words: *Overwriting* is possible.)
# undocumented: # undocumented:
proc getRefcount*[T](x: ref T): int {.importc: "getRefcount", noSideEffect.} proc getRefcount*[T](x: ref T): int {.importc: "getRefcount", noSideEffect,
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.} 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 ## retrieves the reference count of an heap-allocated object. The
## value is implementation-dependent. ## value is implementation-dependent.