first steps for overloading support of passing blocks; bugfix: test results of 'compile' are not overwritten

This commit is contained in:
Araq 2012-09-11 08:09:34 +02:00
commit 64c638a9dc
12 changed files with 70 additions and 39 deletions

View file

@ -388,7 +388,8 @@ proc getSockName*(socket: TSocket): TPort =
proc selectWrite*(writefds: var seq[TSocket], timeout = 500): int
template acceptAddrPlain(noClientRet, successRet: expr, sslImplementation: stmt): stmt =
template acceptAddrPlain(noClientRet, successRet: expr,
sslImplementation: stmt): stmt {.immediate.} =
assert(client != nil)
var sockAddress: Tsockaddr_in
var addrLen = sizeof(sockAddress).TSockLen

View file

@ -39,12 +39,12 @@ type
f: cstring
num, i, lineLen: int
template call(x: stmt) =
template call(x: stmt) {.immediate.} =
p.i = i
x
i = p.i
template callNoLineLenTracking(x: stmt) =
template callNoLineLenTracking(x: stmt) {.immediate.} =
let oldLineLen = p.lineLen
p.i = i
x