summary refs log tree commit diff stats
diff options
context:
space:
mode:
authordef <dennis@felsin9.de>2015-03-01 00:16:36 +0100
committerdef <dennis@felsin9.de>2015-03-01 00:16:46 +0100
commitcfab1394d2932a9cd195145170e2ea2e4b997aa3 (patch)
treefaca0231b9a0752fe618f323872e0a77b8af1ace
parent2df10fc4a60e6c8f7e0b42205dba29988e0a5c06 (diff)
downloadNim-cfab1394d2932a9cd195145170e2ea2e4b997aa3.tar.gz
Make reading from stdin work again.
Bootstrapping tested on Linux from csources.
-rw-r--r--compiler/llstream.nim2
-rw-r--r--compiler/passes.nim2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/llstream.nim b/compiler/llstream.nim
index 69475965d..18ca4aec7 100644
--- a/compiler/llstream.nim
+++ b/compiler/llstream.nim
@@ -35,7 +35,7 @@ proc llStreamOpen*(data: string): PLLStream =
   result.s = data
   result.kind = llsString
 
-proc llStreamOpen*(f: var File): PLLStream = 
+proc llStreamOpen*(f: File): PLLStream = 
   new(result)
   result.f = f
   result.kind = llsFile
diff --git a/compiler/passes.nim b/compiler/passes.nim
index df4816653..96088bd88 100644
--- a/compiler/passes.nim
+++ b/compiler/passes.nim
@@ -172,7 +172,7 @@ proc processModule(module: PSym, stream: PLLStream, rd: PRodReader) =
       let filename = fileIdx.toFullPathConsiderDirty
       if module.name.s == "-":
         module.name.s = "stdinfile"
-        s = llStreamOpenStdIn()
+        s = llStreamOpen(stdin)
       else:
         s = llStreamOpen(filename, fmRead)
       if s == nil: