From 56e007d1658e18d5c12a57f8a56d2ce1aa4bb4b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Fri, 19 Nov 2021 01:07:46 +0100 Subject: [PATCH] comments for recent gcsafe pragmas --- chronos/asyncmacro2.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chronos/asyncmacro2.nim b/chronos/asyncmacro2.nim index bc4ef28..52494a6 100644 --- a/chronos/asyncmacro2.nim +++ b/chronos/asyncmacro2.nim @@ -284,6 +284,7 @@ proc asyncSingleProc(prc: NimNode): NimNode {.compileTime.} = procBody, nnkIteratorDef) closureIterator.pragma = newNimNode(nnkPragma, lineInfoFrom=prc.body) closureIterator.addPragma(newIdentNode("closure")) + # https://github.com/nim-lang/RFCs/issues/435 closureIterator.addPragma(newIdentNode("gcsafe")) # TODO when push raises is active in a module, the iterator here inherits @@ -331,6 +332,7 @@ proc asyncSingleProc(prc: NimNode): NimNode {.compileTime.} = if prc.kind != nnkLambda: # TODO: Nim bug? prc.addPragma(newColonExpr(ident "stackTrace", ident "off")) + # https://github.com/nim-lang/RFCs/issues/435 prc.addPragma(newIdentNode("gcsafe")) result = prc