make tests green again

This commit is contained in:
Andreas Rumpf 2019-03-04 22:44:23 +01:00
commit f907354121
7 changed files with 14 additions and 24 deletions

View file

@ -11,7 +11,6 @@ deallocating
allocating
deallocating
'''
cmd: '''nim c --newruntime $file'''
"""
type
@ -125,7 +124,7 @@ proc `=`*[T](m: var MySeq[T], m2: MySeq[T]) =
`=destroy`(m)
m.len = m2.len
let bytes = m.len.int * sizeof(float)
let bytes = m.len.int * sizeof(float)
if bytes > 0:
m.data = cast[ptr UncheckedArray[T]](allocShared(bytes))
copyMem(m.data, m2.data, bytes)