Don't export bytes iterator for stint types

This commit is contained in:
coffeepots 2018-05-09 14:58:21 +01:00 committed by zah
parent 5d0cb19aa1
commit e5e09718db

View File

@ -1,6 +1,6 @@
import json, stint
iterator bytes*(i: UInt256|Int256): byte =
iterator bytes(i: UInt256|Int256): byte =
let b = cast[ptr array[32, byte]](i.unsafeaddr)
var pos = 0
while pos < 32:
@ -19,7 +19,6 @@ proc `%`*(n: Int256): JsonNode =
for elem in n.bytes:
result.add(%int(elem))
proc `%`*(n: byte): JsonNode =
## Generic constructor for JSON data. Creates a new `JInt JsonNode`.
proc `%`*(n: byte{not lit}): JsonNode =
result = newJInt(int(n))