proper indentation in the generated C code

This commit is contained in:
Zahary Karadjov 2012-06-12 03:36:43 +03:00
commit df1ec09399
6 changed files with 235 additions and 212 deletions

View file

@ -19,9 +19,8 @@ proc AccessThreadLocalVar(p: BProc, s: PSym) =
if emulatedThreadVars() and not p.ThreadVarAccessed:
p.ThreadVarAccessed = true
p.module.usesThreadVars = true
appf(p.procSec(cpsLocals), "NimThreadVars* NimTV;$n")
app(p.procSec(cpsInit),
ropecg(p.module, "NimTV=(NimThreadVars*)#GetThreadLocalVars();$n"))
lineF(p, cpsLocals, "NimThreadVars* NimTV;$n")
lineCg(p, cpsInit, "NimTV = (NimThreadVars*) #GetThreadLocalVars();$n")
var
nimtv: PRope # nimrod thread vars; the struct body