summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-08-10 00:43:58 +0200
committerAraq <rumpf_a@web.de>2011-08-10 00:43:58 +0200
commit72e7a98543e711164574664b0f280637fce28f89 (patch)
tree7dde5ef617a4f356b157fed9a5686022940f05be /lib
parent7000cf51b7c53808624dd7202c4213b84aacf708 (diff)
downloadNim-72e7a98543e711164574664b0f280637fce28f89.tar.gz
added system.slurp for easy embedding of resources
Diffstat (limited to 'lib')
-rwxr-xr-xlib/pure/collections/lists.nim18
-rwxr-xr-xlib/system.nim6
2 files changed, 23 insertions, 1 deletions
diff --git a/lib/pure/collections/lists.nim b/lib/pure/collections/lists.nim
index 55c3d6ad9..3e54dc02b 100755
--- a/lib/pure/collections/lists.nim
+++ b/lib/pure/collections/lists.nim
@@ -35,7 +35,23 @@ type
   
   TDoublyLinkedRing* {.pure, final.}[T] = object ## a doubly linked ring
     head*: PDoublyLinkedNode[T]
-    
+
+proc initSinglyLinkedList*[T](): TSinglyLinkedList[T] =
+  ## creates a new singly linked list that is empty.
+  nil
+
+proc initDoublyLinkedList*[T](): TDoublyLinkedList[T] =
+  ## creates a new doubly linked list that is empty.
+  nil
+
+proc initSinglyLinkedRing*[T](): TSinglyLinkedRing[T] =
+  ## creates a new singly linked ring that is empty.
+  nil
+
+proc initDoublyLinkedRing*[T](): TDoublyLinkedRing[T] =
+  ## creates a new doubly linked ring that is empty.
+  nil
+
 proc newDoublyLinkedNode*[T](value: T): PDoublyLinkedNode[T] =
   ## creates a new doubly linked node with the given `value`.
   new(result)
diff --git a/lib/system.nim b/lib/system.nim
index 024b84077..ace36bcc9 100755
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -1974,4 +1974,10 @@ proc getTypeInfo*[T](x: T): pointer {.magic: "GetTypeInfo".}
   ## get type information for `x`. Ordinary code should not use this, but
   ## the `typeinfo` module instead.
   
+proc slurp*(filename: string): string {.magic: "Slurp".}
+  ## compiletime ``readFile`` proc for easy `resource`:idx: embedding:
+  ## .. code-block:: nimrod
+  ##
+  ##   const myResource = slurp"mydatafile.bin"
+  ##