Fixed some deprecation warnings.
h3rald h3rald@h3rald.com
Sun, 07 Nov 2021 12:10:59 +0100
3 files changed,
3 insertions(+),
3 deletions(-)
M
minpkg/lib/min_crypto.nim
→
minpkg/lib/min_crypto.nim
@@ -47,7 +47,7 @@ {.passL: "-Bstatic -Lminpkg/vendor/openssl/macosx -lssl -lcrypto -Bdynamic".}
proc hash(s: string, kind: EVP_MD, size: int): string = var hash_length: cuint = 0 - var hash = alloc[ptr cuchar](size) + var hash = alloc[ptr uint8](size) let ctx = EVP_MD_CTX_new() discard EVP_DigestInit_ex(ctx, kind, nil) discard EVP_DigestUpdate(ctx, unsafeAddr s[0], s.len.cuint)
M
minpkg/lib/min_http.nim
→
minpkg/lib/min_http.nim
@@ -51,7 +51,7 @@ if req.dhas("body"):
body = i.dget(req, "body") meth = i.dget(req, "method") url = i.dget(req, "url") - let resp = cli.request(url = url.getString, httpMethod = meth.getString, body = body.getString, headers = headers) + let resp = cli.request(url = url.getString, httpMethod = parseEnum[HttpMethod](meth.getString), body = body.getString, headers = headers) var res = newDict(i.scope) res.objType = "http-response" res = i.dset(res, "version", resp.version.newVal)
M
minpkg/lib/min_time.nim
→
minpkg/lib/min_time.nim
@@ -49,7 +49,7 @@ let hour: HourRange = i.dget(dict, "hour").intVal.int
let minute: MinuteRange = i.dget(dict, "minute").intVal.int let second: SecondRange = i.dget(dict, "second").intVal.int let timezone = i.dget(dict, "timezone").intVal.int - let tinfo = initDatetime(monthday, month, year, hour, minute, second, 00, utc()) + let tinfo = datetime(monthday, month, year, hour, minute, second, 00, utc()) i.push (tinfo + timezone.seconds).toTime.toUnix.int.newVal except: raiseInvalid("An invalid timeinfo dictionary was provided.")