Skip to content

Commit

Permalink
revert: embedded work, switch to gc unsafe -- globals are useful in e…
Browse files Browse the repository at this point in the history
…mbedded
  • Loading branch information
elcritch committed Nov 3, 2020
1 parent 1749331 commit 58382a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/nesper/servers/rpc/router.nim
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ template wrapException(body: untyped) =
return resp


proc route*(router: RpcRouter, node: JsonNode): JsonNode =
proc route*(router: RpcRouter, node: JsonNode): JsonNode {.gcsafe.} =
## Assumes correct setup of node
let
methodName = node[methodField].str
Expand Down Expand Up @@ -202,11 +202,11 @@ macro rpc*(server: RpcRouter, path: string, body: untyped): untyped =
if ReturnType == ident"JsonNode":
# `JsonNode` results don't need conversion
result.add quote do:
proc `procName`(`paramsIdent`: JsonNode): JsonNode =
proc `procName`(`paramsIdent`: JsonNode): JsonNode {.gcsafe.} =
return `doMain`(`paramsIdent`)
else:
result.add quote do:
proc `procName`(`paramsIdent`: JsonNode): JsonNode =
proc `procName`(`paramsIdent`: JsonNode): JsonNode {.gcsafe.} =
return %* `doMain`(`paramsIdent`)


Expand Down

0 comments on commit 58382a9

Please sign in to comment.