summary refs log tree commit diff stats
path: root/lib/pure/oids.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure/oids.nim')
-rw-r--r--lib/pure/oids.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pure/oids.nim b/lib/pure/oids.nim
index e6e5e6e56..4d6ceefd7 100644
--- a/lib/pure/oids.nim
+++ b/lib/pure/oids.nim
@@ -14,7 +14,7 @@
 ## This implementation calls `initRand()` for the first call of
 ## `genOid`.
 
-import hashes, times, endians, random
+import std/[hashes, times, endians, random]
 from std/private/decode_helpers import handleHexChar
 
 when defined(nimPreviewSlimSystem):
@@ -44,7 +44,7 @@ proc hexbyte*(hex: char): int {.inline.} =
 
 proc parseOid*(str: cstring): Oid =
   ## Parses an OID.
-  var bytes = cast[cstring](cast[pointer](cast[ByteAddress](addr(result.time)) + 4))
+  var bytes = cast[cstring](cast[pointer](cast[int](addr(result.time)) + 4))
   var i = 0
   while i < 12:
     bytes[i] = chr((hexbyte(str[2 * i]) shl 4) or hexbyte(str[2 * i + 1]))
@@ -57,7 +57,7 @@ proc `$`*(oid: Oid): string =
   result.setLen 24
 
   var o = oid
-  var bytes = cast[cstring](cast[pointer](cast[ByteAddress](addr(o)) + 4))
+  var bytes = cast[cstring](cast[pointer](cast[int](addr(o)) + 4))
   var i = 0
   while i < 12:
     let b = bytes[i].ord