* remove `shallow` seqs/strings for ORC * add a changelog item * change url of DelaunayNim
This commit is contained in:
parent
964afd3050
commit
723a71bd22
9 changed files with 36 additions and 45 deletions
|
|
@ -175,12 +175,14 @@ when not defined(nimseqsv2):
|
|||
var emptySeq: seq[int] = newSeq[int]()
|
||||
block:
|
||||
var t = @[1,2,3]
|
||||
shallow(nilSeq)
|
||||
when defined(gcRefc):
|
||||
shallow(nilSeq)
|
||||
t = nilSeq
|
||||
doAssert t == @[]
|
||||
block:
|
||||
var t = @[1,2,3]
|
||||
shallow(emptySeq)
|
||||
when defined(gcRefc):
|
||||
shallow(emptySeq)
|
||||
t = emptySeq
|
||||
doAssert t == @[]
|
||||
block:
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ proc initBytesRange*(s: var Bytes, ibegin = 0, iend = -1): BytesRange =
|
|||
let e = if iend < 0: s.len + iend + 1
|
||||
else: iend
|
||||
assert ibegin > 0 and e <= s.len
|
||||
|
||||
shallow(s)
|
||||
when defined(gcRefc):
|
||||
shallow(s)
|
||||
result.bytes = s
|
||||
result.ibegin = ibegin
|
||||
result.iend = e
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ proc initBytesRange*(s: var Bytes, ibegin = 0, iend = -1): BytesRange =
|
|||
let e = if iend < 0: s.len + iend + 1
|
||||
else: iend
|
||||
assert ibegin >= 0 and e <= s.len
|
||||
|
||||
shallow(s)
|
||||
when defined(gcRefc):
|
||||
shallow(s)
|
||||
result.bytes = s
|
||||
result.ibegin = ibegin
|
||||
result.iend = e
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ block: # setLen
|
|||
block: # forceCopy
|
||||
var a: string
|
||||
a = "foo"
|
||||
shallow(a)
|
||||
when defined(gcRefc):
|
||||
shallow(a)
|
||||
var b: string
|
||||
b = a
|
||||
doAssert b[0].addr == a[0].addr
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ when true:
|
|||
|
||||
# casting an empty string as sequence with shallow() should not segfault
|
||||
var s2: string
|
||||
shallow(s2)
|
||||
when defined(gcRefc):
|
||||
shallow(s2)
|
||||
s2 &= "foo"
|
||||
doAssert s2 == "foo"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue