summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-07-26 08:51:49 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-07-26 08:51:49 +0200
commitb69598a64aa9c39270498f977cb7279405256f0b (patch)
treea7b9678297137b305c19a5e5f82189522e2b0cea
parent50f62ff44a4c448eceacd2d0f8b8fe8457a2e820 (diff)
downloadNim-b69598a64aa9c39270498f977cb7279405256f0b.tar.gz
workaround so doc2 asynchttpserver works again
-rw-r--r--lib/pure/asyncmacro.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pure/asyncmacro.nim b/lib/pure/asyncmacro.nim
index 9befb2f8b..6e7d7993f 100644
--- a/lib/pure/asyncmacro.nim
+++ b/lib/pure/asyncmacro.nim
@@ -28,7 +28,7 @@ template createCb(retFutureSym, iteratorNameSym,
                   name, futureVarCompletions: untyped) =
   var nameIterVar = iteratorNameSym
   #{.push stackTrace: off.}
-  proc cb {.closure.} =
+  proc cb0 {.closure.} =
     try:
       if not nameIterVar.finished:
         var next = nameIterVar()
@@ -40,7 +40,7 @@ template createCb(retFutureSym, iteratorNameSym,
         else:
           {.gcsafe.}:
             {.push hint[ConvFromXtoItselfNotNeeded]: off.}
-            next.callback = (proc() {.closure, gcsafe.})(cb)
+            next.callback = (proc() {.closure, gcsafe.})(cb0)
             {.pop.}
     except:
       futureVarCompletions
@@ -52,7 +52,7 @@ template createCb(retFutureSym, iteratorNameSym,
       else:
         retFutureSym.fail(getCurrentException())
 
-  cb()
+  cb0()
   #{.pop.}
 proc generateExceptionCheck(futSym,
     tryStmt, rootReceiver, fromNode: NimNode): NimNode {.compileTime.} =