summary refs log tree commit diff stats
path: root/lib/pure/collections
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure/collections')
-rw-r--r--lib/pure/collections/intsets.nim14
-rw-r--r--lib/pure/collections/sequtils.nim2
-rw-r--r--lib/pure/collections/tables.nim6
3 files changed, 11 insertions, 11 deletions
diff --git a/lib/pure/collections/intsets.nim b/lib/pure/collections/intsets.nim
index 367caf2e7..f1e67fc0e 100644
--- a/lib/pure/collections/intsets.nim
+++ b/lib/pure/collections/intsets.nim
@@ -71,8 +71,8 @@ proc intSetEnlarge(t: var TIntSet) =
   var oldMax = t.max
   t.max = ((t.max + 1) * 2) - 1
   newSeq(n, t.max + 1)
-  for i in countup(0, oldmax): 
-    if t.data[i] != nil: IntSetRawInsert(t, n, t.data[i])
+  for i in countup(0, oldMax): 
+    if t.data[i] != nil: intSetRawInsert(t, n, t.data[i])
   swap(t.data, n)
 
 proc intSetPut(t: var TIntSet, key: int): PTrunk = 
@@ -81,7 +81,7 @@ proc intSetPut(t: var TIntSet, key: int): PTrunk =
     if t.data[h].key == key: 
       return t.data[h]
     h = nextTry(h, t.max)
-  if mustRehash(t.max + 1, t.counter): IntSetEnlarge(t)
+  if mustRehash(t.max + 1, t.counter): intSetEnlarge(t)
   inc(t.counter)
   h = key and t.max
   while t.data[h] != nil: h = nextTry(h, t.max)
@@ -94,7 +94,7 @@ proc intSetPut(t: var TIntSet, key: int): PTrunk =
 
 proc contains*(s: TIntSet, key: int): bool =
   ## returns true iff `key` is in `s`.  
-  var t = IntSetGet(s, `shr`(key, TrunkShift))
+  var t = intSetGet(s, `shr`(key, TrunkShift))
   if t != nil: 
     var u = key and TrunkMask
     result = (t.bits[`shr`(u, IntShift)] and `shl`(1, u and IntMask)) != 0
@@ -103,14 +103,14 @@ proc contains*(s: TIntSet, key: int): bool =
   
 proc incl*(s: var TIntSet, key: int) = 
   ## includes an element `key` in `s`.
-  var t = IntSetPut(s, `shr`(key, TrunkShift))
+  var t = intSetPut(s, `shr`(key, TrunkShift))
   var u = key and TrunkMask
   t.bits[`shr`(u, IntShift)] = t.bits[`shr`(u, IntShift)] or
       `shl`(1, u and IntMask)
 
 proc excl*(s: var TIntSet, key: int) = 
   ## excludes `key` from the set `s`.
-  var t = IntSetGet(s, `shr`(key, TrunkShift))
+  var t = intSetGet(s, `shr`(key, TrunkShift))
   if t != nil: 
     var u = key and TrunkMask
     t.bits[`shr`(u, IntShift)] = t.bits[`shr`(u, IntShift)] and
@@ -119,7 +119,7 @@ proc excl*(s: var TIntSet, key: int) =
 proc containsOrIncl*(s: var TIntSet, key: int): bool = 
   ## returns true if `s` contains `key`, otherwise `key` is included in `s`
   ## and false is returned.
-  var t = IntSetGet(s, `shr`(key, TrunkShift))
+  var t = intSetGet(s, `shr`(key, TrunkShift))
   if t != nil: 
     var u = key and TrunkMask
     result = (t.bits[`shr`(u, IntShift)] and `shl`(1, u and IntMask)) != 0
diff --git a/lib/pure/collections/sequtils.nim b/lib/pure/collections/sequtils.nim
index 3a009a8cb..3993f1ccc 100644
--- a/lib/pure/collections/sequtils.nim
+++ b/lib/pure/collections/sequtils.nim
@@ -136,7 +136,7 @@ proc delete*[T](s: var seq[T], first=0, last=0) =
     s[i].shallowCopy(s[j])
     inc(i)
     inc(j)
-  setlen(s, newLen)
+  setLen(s, newLen)
 
 proc insert*[T](dest: var seq[T], src: openArray[T], pos=0) =
   ## Inserts items from `src` into `dest` at position `pos`. This modifies
diff --git a/lib/pure/collections/tables.nim b/lib/pure/collections/tables.nim
index ef3a529a1..4b9e8af0e 100644
--- a/lib/pure/collections/tables.nim
+++ b/lib/pure/collections/tables.nim
@@ -168,7 +168,7 @@ proc initTable*[A, B](initialSize=64): TTable[A, B] =
   result.counter = 0
   newSeq(result.data, initialSize)
 
-proc toTable*[A, B](pairs: openarray[tuple[key: A, 
+proc toTable*[A, B](pairs: openArray[tuple[key: A, 
                     val: B]]): TTable[A, B] =
   ## creates a new hash table that contains the given `pairs`.
   result = initTable[A, B](nextPowerOfTwo(pairs.len+10))
@@ -304,7 +304,7 @@ proc initOrderedTable*[A, B](initialSize=64): TOrderedTable[A, B] =
   result.last = -1
   newSeq(result.data, initialSize)
 
-proc toOrderedTable*[A, B](pairs: openarray[tuple[key: A, 
+proc toOrderedTable*[A, B](pairs: openArray[tuple[key: A, 
                            val: B]]): TOrderedTable[A, B] =
   ## creates a new ordered hash table that contains the given `pairs`.
   result = initOrderedTable[A, B](nextPowerOfTwo(pairs.len+10))
@@ -463,7 +463,7 @@ proc `$`*[A](t: TCountTable[A]): string =
 
 proc inc*[A](t: var TCountTable[A], key: A, val = 1) = 
   ## increments `t[key]` by `val`.
-  var index = RawGet(t, key)
+  var index = rawGet(t, key)
   if index >= 0:
     inc(t.data[index].val, val)
   else: