Merge pull request #3990 from yglukhov/js-tables-fix
Fixed Table::del in JS
This commit is contained in:
commit
709b0aeb8d
1 changed files with 4 additions and 1 deletions
|
|
@ -129,4 +129,7 @@ template delImpl() {.dirty, immediate.} =
|
||||||
r = t.data[i].hcode and msk # "home" location of key@i
|
r = t.data[i].hcode and msk # "home" location of key@i
|
||||||
if not ((i >= r and r > j) or (r > j and j > i) or (j > i and i >= r)):
|
if not ((i >= r and r > j) or (r > j and j > i) or (j > i and i >= r)):
|
||||||
break
|
break
|
||||||
shallowCopy(t.data[j], t.data[i]) # data[j] will be marked EMPTY next loop
|
when defined(js):
|
||||||
|
t.data[j] = t.data[i]
|
||||||
|
else:
|
||||||
|
shallowCopy(t.data[j], t.data[i]) # data[j] will be marked EMPTY next loop
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue