summary refs log tree commit diff stats
path: root/lib/deprecated/pure
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-08-23 10:16:52 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-08-23 10:16:52 +0200
commitbbfe28ec5c4bafa94fc47fecb42449879f8deb85 (patch)
treeab7876554cb2ef62e0166081df82019f7c1c0a38 /lib/deprecated/pure
parentf439a2f25f8e2aac2278322aa7ee351390d8161c (diff)
downloadNim-bbfe28ec5c4bafa94fc47fecb42449879f8deb85.tar.gz
make tests green again
Diffstat (limited to 'lib/deprecated/pure')
-rw-r--r--lib/deprecated/pure/ftpclient.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/deprecated/pure/ftpclient.nim b/lib/deprecated/pure/ftpclient.nim
index 1188c0795..ed2f14450 100644
--- a/lib/deprecated/pure/ftpclient.nim
+++ b/lib/deprecated/pure/ftpclient.nim
@@ -129,10 +129,10 @@ proc ftpClient*(address: string, port = Port(21),
   result.csock = socket()
   if result.csock == invalidSocket: raiseOSError(osLastError())
 
-template blockingOperation(sock: Socket, body: stmt) {.immediate.} =
+template blockingOperation(sock: Socket, body: untyped) =
   body
 
-template blockingOperation(sock: asyncio.AsyncSocket, body: stmt) {.immediate.} =
+template blockingOperation(sock: asyncio.AsyncSocket, body: untyped) =
   sock.setBlocking(true)
   body
   sock.setBlocking(false)
g.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
import strutils, os, pegs, strtabs, math, threadpool, times

proc fakeCppDep(x: ptr float) {.importcpp: "fakeCppDep", header: "<vector>".}
proc fakeTimeDep() = echo(times.getDateStr())
proc fakedeps() =
  var x = 0.4
  {.emit: "#if 0\n".}
  fakeCppDep(addr x)
  {.emit: "#endif\n".}

  # this is not true:
  if math.sin(x) > 0.6:
    spawn(fakeTimeDep())

proc main =
  fakedeps()
when isMainModule:
  main()