summary refs log tree commit diff stats
path: root/lib/pure/lexbase.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-11-12 12:17:44 +0100
committerAraq <rumpf_a@web.de>2011-11-12 12:17:44 +0100
commit395b05f9113d30d1e63390e7a84dbe2a9a55718d (patch)
treece6bc0b764f96af3181abb915f140bddc7c6428c /lib/pure/lexbase.nim
parent40fa4bb52dd49f7dd1c3485c995c3652697c78c6 (diff)
downloadNim-395b05f9113d30d1e63390e7a84dbe2a9a55718d.tar.gz
tester uses same layout as nimbuild
Diffstat (limited to 'lib/pure/lexbase.nim')
-rwxr-xr-xlib/pure/lexbase.nim10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/pure/lexbase.nim b/lib/pure/lexbase.nim
index c875e10bc..2756290d8 100755
--- a/lib/pure/lexbase.nim
+++ b/lib/pure/lexbase.nim
@@ -64,7 +64,7 @@ const
 
 proc close(L: var TBaseLexer) =
   dealloc(L.buf)
-  L.input.close(L.input)
+  close(L.input)
 
 proc FillBuffer(L: var TBaseLexer) =
   var
@@ -80,8 +80,8 @@ proc FillBuffer(L: var TBaseLexer) =
   if toCopy > 0:
     MoveMem(L.buf, addr(L.buf[L.sentinel + 1]), toCopy * chrSize) 
     # "moveMem" handles overlapping regions
-  charsRead = L.input.readData(L.input, addr(L.buf[toCopy]),
-                               (L.sentinel + 1) * chrSize) div chrSize
+  charsRead = readData(L.input, addr(L.buf[toCopy]),
+                       (L.sentinel + 1) * chrSize) div chrSize
   s = toCopy + charsRead
   if charsRead < L.sentinel + 1:
     L.buf[s] = EndOfFile      # set end marker
@@ -103,8 +103,8 @@ proc FillBuffer(L: var TBaseLexer) =
         L.bufLen = L.BufLen * 2
         L.buf = cast[cstring](realloc(L.buf, L.bufLen * chrSize))
         assert(L.bufLen - oldBuflen == oldBufLen)
-        charsRead = L.input.ReadData(L.input, addr(L.buf[oldBufLen]),
-                                     oldBufLen * chrSize) div chrSize
+        charsRead = ReadData(L.input, addr(L.buf[oldBufLen]),
+                             oldBufLen * chrSize) div chrSize
         if charsRead < oldBufLen:
           L.buf[oldBufLen + charsRead] = EndOfFile
           L.sentinel = oldBufLen + charsRead