mirror of https://github.com/vacp2p/nim-libp2p.git
Fix devel 32bits (#818)
This commit is contained in:
parent
3863a4cd21
commit
a17cad710c
|
@ -58,10 +58,7 @@ type
|
||||||
SomeVarint* = PBSomeVarint | LPSomeVarint
|
SomeVarint* = PBSomeVarint | LPSomeVarint
|
||||||
SomeUVarint* = PBSomeUVarint | LPSomeUVarint
|
SomeUVarint* = PBSomeUVarint | LPSomeUVarint
|
||||||
|
|
||||||
template toUleb(x: uint64): uint64 = x
|
template toUleb[T: uint64|uint32|uint16|uint8|uint](x: T): T = x
|
||||||
template toUleb(x: uint32): uint32 = x
|
|
||||||
template toUleb(x: uint16): uint16 = x
|
|
||||||
template toUleb(x: uint8): uint8 = x
|
|
||||||
|
|
||||||
func toUleb(x: zint64): uint64 =
|
func toUleb(x: zint64): uint64 =
|
||||||
let v = cast[uint64](x)
|
let v = cast[uint64](x)
|
||||||
|
|
Loading…
Reference in New Issue