summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-01-13 20:55:03 +0100
committerAraq <rumpf_a@web.de>2015-01-13 20:56:31 +0100
commit20774ad43c84048ffedb1b54625effc28b27a71d (patch)
tree354912c3bda96c2bf0208609a26978e268f8941c /lib/pure
parentc94f5bfb0612b1ed63ceddd156dbee968b6bf896 (diff)
downloadNim-20774ad43c84048ffedb1b54625effc28b27a71d.tar.gz
fixes the integer conversion regressions
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/net.nim6
-rw-r--r--lib/pure/streams.nim2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/pure/net.nim b/lib/pure/net.nim
index 5e6bdae26..4eacfea78 100644
--- a/lib/pure/net.nim
+++ b/lib/pure/net.nim
@@ -1036,7 +1036,7 @@ proc `$`*(address: TIpAddress): string =
     else: # Print address
       var printedLastGroup = false
       for i in 0..7:
-        var word:uint16 = (cast[uint16](address.address_v6[i*2])) shl 8u16
+        var word:uint16 = (cast[uint16](address.address_v6[i*2])) shl 8
         word = word or cast[uint16](address.address_v6[i*2+1])
 
         if biggestZeroCount != 0 and # Check if group is in skip group
@@ -1058,7 +1058,7 @@ proc `$`*(address: TIpAddress): string =
               else: # val >= 0xA
                 result.add(chr(uint16(ord('a'))+val-0xA))
               afterLeadingZeros = true
-            mask = mask shr 4u16
+            mask = mask shr 4
           printedLastGroup = true
 
 proc parseIPv4Address(address_str: string): TIpAddress =
@@ -1073,7 +1073,7 @@ proc parseIPv4Address(address_str: string): TIpAddress =
 
   for i in 0 .. high(address_str):
     if address_str[i] in strutils.Digits: # Character is a number
-      currentByte = currentByte * 10u16 +
+      currentByte = currentByte * 10 +
         cast[uint16](ord(address_str[i]) - ord('0'))
       if currentByte > 255'u16:
         raise newException(ValueError,
diff --git a/lib/pure/streams.nim b/lib/pure/streams.nim
index 31aa7497d..55351ffd4 100644
--- a/lib/pure/streams.nim
+++ b/lib/pure/streams.nim
@@ -284,7 +284,7 @@ when not defined(js):
   proc newFileStream*(filename: string, mode: FileMode): FileStream =
     ## creates a new stream from the file named `filename` with the mode `mode`.
     ## If the file cannot be opened, nil is returned. See the `system
-    ## <system.html>`_ module for a list of available TFileMode enums.
+    ## <system.html>`_ module for a list of available FileMode enums.
     var f: File
     if open(f, filename, mode): result = newFileStream(f)