mirror of
https://github.com/status-im/nim-json-rpc.git
synced 2025-02-24 18:28:10 +00:00
Add ref int and ref int64
This commit is contained in:
parent
3bcc481c9b
commit
13a9a1f58b
@ -9,8 +9,11 @@ proc `%`*(n: byte{not lit}): JsonNode =
|
||||
proc `%`*(n: uint64{not lit}): JsonNode =
|
||||
result = newJInt(int(n))
|
||||
|
||||
proc `%`*(n: ref int|ref int64): JsonNode =
|
||||
result = newJInt(int(n[]))
|
||||
proc `%`*(n: ref int | ref int64): JsonNode =
|
||||
if n.isNil:
|
||||
result = newJNull()
|
||||
else:
|
||||
result = newJInt(n[])
|
||||
|
||||
# Compiler requires forward decl when processing out of module
|
||||
proc fromJson(n: JsonNode, argName: string, result: var bool)
|
||||
|
Loading…
x
Reference in New Issue
Block a user