Merge pull request #4162 from Lompik/devel
Fix 2 compile errors in LockFreeHash.nim
This commit is contained in:
commit
0662f3be4c
1 changed files with 3 additions and 3 deletions
|
|
@ -52,7 +52,7 @@ when sizeof(int) == 4: # 32bit
|
||||||
{.deprecated: [TRaw: Raw].}
|
{.deprecated: [TRaw: Raw].}
|
||||||
elif sizeof(int) == 8: # 64bit
|
elif sizeof(int) == 8: # 64bit
|
||||||
type
|
type
|
||||||
Raw = range[0..4611686018427387903]
|
Raw = range[0'i64..4611686018427387903'i64]
|
||||||
## The range of uint values that can be stored directly in a value slot
|
## The range of uint values that can be stored directly in a value slot
|
||||||
## when on a 64 bit platform
|
## when on a 64 bit platform
|
||||||
{.deprecated: [TRaw: Raw].}
|
{.deprecated: [TRaw: Raw].}
|
||||||
|
|
@ -244,9 +244,9 @@ proc copySlot[K,V](idx: int, oldTbl: var PConcTable[K,V], newTbl: var PConcTable
|
||||||
echo("oldVal is Tomb!!!, should not happen")
|
echo("oldVal is Tomb!!!, should not happen")
|
||||||
if pop(oldVal) != 0:
|
if pop(oldVal) != 0:
|
||||||
result = setVal(newTbl, pop(oldKey), pop(oldVal), 0, true) == 0
|
result = setVal(newTbl, pop(oldKey), pop(oldVal), 0, true) == 0
|
||||||
if result:
|
#if result:
|
||||||
#echo("Copied a Slot! idx= " & $idx & " key= " & $oldKey & " val= " & $oldVal)
|
#echo("Copied a Slot! idx= " & $idx & " key= " & $oldKey & " val= " & $oldVal)
|
||||||
else:
|
#else:
|
||||||
#echo("copy slot failed")
|
#echo("copy slot failed")
|
||||||
# Our copy is done so we disable the old slot
|
# Our copy is done so we disable the old slot
|
||||||
while not ok:
|
while not ok:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue