From 53e98faa74ce3f9e690fc985e56d18cf76b67b42 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Sun, 6 Jan 2019 12:07:34 +0200 Subject: [PATCH] A shot in the dark trying to fix the Nimbus Windows build problems --- eth_p2p/rlpx.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eth_p2p/rlpx.nim b/eth_p2p/rlpx.nim index 68a4b83..072e2ac 100644 --- a/eth_p2p/rlpx.nim +++ b/eth_p2p/rlpx.nim @@ -169,17 +169,17 @@ proc cmp*(lhs, rhs: ProtocolInfo): int = return int16(lhs.name[i]) - int16(rhs.name[i]) return 0 -proc messagePrinter[MsgType](msg: pointer): string = +proc messagePrinter[MsgType](msg: pointer): string {.gcsafe.} = result = "" # TODO: uncommenting the line below increases the compile-time # tremendously (for reasons not yet known) # result = $(cast[ptr MsgType](msg)[]) -proc nextMsgResolver[MsgType](msgData: Rlp, future: FutureBase) = +proc nextMsgResolver[MsgType](msgData: Rlp, future: FutureBase) {.gcsafe.} = var reader = msgData Future[MsgType](future).complete reader.readRecordType(MsgType, MsgType.rlpFieldsCount > 1) -proc requestResolver[MsgType](msg: pointer, future: FutureBase) = +proc requestResolver[MsgType](msg: pointer, future: FutureBase) {.gcsafe.} = var f = Future[Option[MsgType]](future) if not f.finished: if msg != nil: