diff options
Diffstat (limited to 'compiler/cgen.nim')
-rw-r--r-- | compiler/cgen.nim | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/cgen.nim b/compiler/cgen.nim index 92cc3819b..e87f512c8 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -206,15 +206,15 @@ proc indentLine(p: BProc, r: Rope): Rope = prepend(result, "\t".rope) template appcg(m: BModule, c: var Rope, frmt: FormatStr, - args: varargs[untyped]) = + args: untyped) = add(c, ropecg(m, frmt, args)) template appcg(m: BModule, sec: TCFileSection, frmt: FormatStr, - args: varargs[untyped]) = + args: untyped) = add(m.s[sec], ropecg(m, frmt, args)) template appcg(p: BProc, sec: TCProcSection, frmt: FormatStr, - args: varargs[untyped]) = + args: untyped) = add(p.s(sec), ropecg(p.module, frmt, args)) template line(p: BProc, sec: TCProcSection, r: Rope) = @@ -224,7 +224,7 @@ template line(p: BProc, sec: TCProcSection, r: string) = add(p.s(sec), indentLine(p, r.rope)) template lineF(p: BProc, sec: TCProcSection, frmt: FormatStr, - args: openarray[Rope]) = + args: untyped) = add(p.s(sec), indentLine(p, frmt % args)) template lineCg(p: BProc, sec: TCProcSection, frmt: FormatStr, @@ -484,7 +484,7 @@ proc localVarDecl(p: BProc; n: PNode): Rope = add(result, " ") add(result, s.loc.r) else: - result = s.cgDeclFrmt % [result, s.loc.r] + result = runtimeFormat(s.cgDeclFrmt, [result, s.loc.r]) proc assignLocalVar(p: BProc, n: PNode) = #assert(s.loc.k == locNone) # not yet assigned @@ -535,7 +535,7 @@ proc assignGlobalVar(p: BProc, n: PNode) = if sfVolatile in s.flags: add(decl, " volatile") addf(decl, " $1;$n", [s.loc.r]) else: - decl = (s.cgDeclFrmt & ";$n") % [td, s.loc.r] + decl = runtimeFormat(s.cgDeclFrmt & ";$n", [td, s.loc.r]) add(p.module.s[cfsVars], decl) if p.withinLoop > 0: # fixes tests/run/tzeroarray: |