Files
Nim/lib/system/seqs_v2_reimpl.nim
2026-02-23 13:39:55 +01:00

26 lines
550 B
Nim

#
#
# Nim's Runtime Library
# (c) Copyright 2020 Nim contributors
#
# See the file "copying.txt", included in this
# distribution, for details about the copyright.
#
type
NimSeqPayloadReimpl = object
cap: int
data: pointer
NimSeqV2Reimpl = object
len: int
p: ptr NimSeqPayloadReimpl
template frees(s: NimSeqV2Reimpl) =
if s.p != nil and (s.p.cap and strlitFlag) != strlitFlag:
yrcMutatorLockUntyped:
when compileOption("threads"):
deallocShared(s.p)
else:
dealloc(s.p)