From ce5a1365c2ef5c0031b90df01d5e5c0da839e008 Mon Sep 17 00:00:00 2001 From: Araq Date: Sat, 18 May 2013 10:05:06 +0200 Subject: [PATCH] preparations for the new symbol binding rules for clean templates --- compiler/ccgcalls.nim | 2 +- lib/pure/sockets.nim | 2 +- lib/system.nim | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/compiler/ccgcalls.nim b/compiler/ccgcalls.nim index b8b7f4c44d..1d6df3c15a 100644 --- a/compiler/ccgcalls.nim +++ b/compiler/ccgcalls.nim @@ -163,7 +163,7 @@ proc genClosureCall(p: BProc, le, ri: PNode, d: var TLoc) = app(pl, genArgNoParam(p, ri.sons[i])) if i < length - 1: app(pl, ~", ") - template genCallPattern = + template genCallPattern {.dirty.} = lineF(p, cpsStmts, CallPattern & ";$n", op.r, pl, pl.addComma, rawProc) let rawProc = getRawProcType(p, typ) diff --git a/lib/pure/sockets.nim b/lib/pure/sockets.nim index 2d602c86e6..17e4d31186 100644 --- a/lib/pure/sockets.nim +++ b/lib/pure/sockets.nim @@ -1028,7 +1028,7 @@ proc readIntoBuf(socket: TSocket, flags: int32): int = socket.bufLen = result socket.currPos = 0 -template retRead(flags, readBytes: int) = +template retRead(flags, readBytes: int) {.dirty.} = let res = socket.readIntoBuf(flags.int32) if res <= 0: if readBytes > 0: diff --git a/lib/system.nim b/lib/system.nim index 4cdc212b90..1e284f68ae 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -194,7 +194,8 @@ when not defined(JS) and not defined(NimrodVM): data: array[0..100_000_000, char] NimString = ptr NimStringDesc - template space(s: PGenericSeq): int = s.reserved and not seqShallowFlag + template space(s: PGenericSeq): int {.dirty.} = + s.reserved and not seqShallowFlag include "system/hti"