diff options
author | Araq <rumpf_a@web.de> | 2011-04-23 23:51:39 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-04-23 23:51:39 +0200 |
commit | 4591ab0f12e6ad8fb1e1bbd748a138081313ef33 (patch) | |
tree | bc725112e65181fcf1bd67b6f9eca59a9a0ce4b1 /lib/pure/collections | |
parent | 86e1408a39f13a34100f2bd090fdc2f17ae2a6ba (diff) | |
download | Nim-4591ab0f12e6ad8fb1e1bbd748a138081313ef33.tar.gz |
c2nim compiles again
Diffstat (limited to 'lib/pure/collections')
-rw-r--r-- | lib/pure/collections/hashtables.nim | 1 | ||||
-rwxr-xr-x | lib/pure/collections/lists.nim | 13 |
2 files changed, 11 insertions, 3 deletions
diff --git a/lib/pure/collections/hashtables.nim b/lib/pure/collections/hashtables.nim index 6730163c2..9562d3a6a 100644 --- a/lib/pure/collections/hashtables.nim +++ b/lib/pure/collections/hashtables.nim @@ -126,7 +126,6 @@ proc `$`*[A, B](t: PHashTable[A, B]): string = result.add($val) result.add("}") - # ------------------------------ count tables ------------------------------- const diff --git a/lib/pure/collections/lists.nim b/lib/pure/collections/lists.nim index cae6d4620..930fd776e 100755 --- a/lib/pure/collections/lists.nim +++ b/lib/pure/collections/lists.nim @@ -12,15 +12,24 @@ ## be manipulated directly for efficiency. type - TDoublyLinkedNode[T] {.pure, final.} = object + TDoublyLinkedNode*[T] {.pure, + final.} = object ## a node a doubly linked list consists of next*, prev*: ref TDoublyLinkedNode[T] value*: T PDoublyLinkedNode*[T] = ref TDoublyLinkedNode[T] - TSinglyLinkedNode[T] {.pure, final.} = object + TSinglyLinkedNode*[T] {.pure, + final.} = object ## a node a singly linked list consists of next*: ref TSinglyLinkedNode[T] value*: T PSinglyLinkedNode*[T] = ref TSinglyLinkedNode[T] + + TRingNode[T] {.pure, + final.} = object ## a node a ring list consists of + next*, prev*: ref TRingNode[T] + value*: T + + PRingNode*[T] = ref TRingNode[T] proc newDoublyLinkedNode*[T](value: T): PDoublyLinkedNode[T] = ## creates a new doubly linked node with the given `value`. |