diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-07-26 08:52:03 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-07-26 08:52:03 +0200 |
commit | a3f80c4bdf59a8dae879256d2044677a6eea6e83 (patch) | |
tree | 44faafe84adb05e8fdc93703e77af8862f4a1618 | |
parent | b69598a64aa9c39270498f977cb7279405256f0b (diff) | |
download | Nim-a3f80c4bdf59a8dae879256d2044677a6eea6e83.tar.gz |
avoid deprecated procs
-rw-r--r-- | lib/pure/uri.nim | 2 | ||||
-rw-r--r-- | lib/wrappers/openssl.nim | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/pure/uri.nim b/lib/pure/uri.nim index dd6e6c9af..d8e4ed52f 100644 --- a/lib/pure/uri.nim +++ b/lib/pure/uri.nim @@ -81,7 +81,7 @@ proc parsePath(uri: string, i: var int, result: var Uri) = i.inc parseUntil(uri, result.path, {'?', '#'}, i) # The 'mailto' scheme's PATH actually contains the hostname/username - if result.scheme.toLower == "mailto": + if cmpIgnoreCase(result.scheme, "mailto") == 0: parseAuthority(result.path, result) result.path.setLen(0) diff --git a/lib/wrappers/openssl.nim b/lib/wrappers/openssl.nim index ff18fc2c2..40b54b08d 100644 --- a/lib/wrappers/openssl.nim +++ b/lib/wrappers/openssl.nim @@ -588,13 +588,13 @@ proc md5*(d: ptr cuchar; n: csize; md: ptr cuchar): ptr cuchar{.importc: "MD5".} proc md5_Transform*(c: var MD5_CTX; b: ptr cuchar){.importc: "MD5_Transform".} {.pop.} -from strutils import toHex,toLower +from strutils import toHex, toLowerAscii proc hexStr (buf:cstring): string = # turn md5s output into a nice hex str result = newStringOfCap(32) for i in 0 .. <16: - result.add toHex(buf[i].ord, 2).toLower + result.add toHex(buf[i].ord, 2).toLowerAscii proc md5_File* (file: string): string {.raises: [IOError,Exception].} = ## Generate MD5 hash for a file. Result is a 32 character |