diff options
author | Araq <rumpf_a@web.de> | 2012-08-16 08:34:33 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-08-16 08:34:33 +0200 |
commit | 0171566c98d7341ef6c4c36a1d056b19e24f681e (patch) | |
tree | dd211866c615402ae1f380d1ed79eb1cef27eb1b /compiler/ropes.nim | |
parent | 12151930101f6eacb834c2102cfdaccc637ce72a (diff) | |
download | Nim-0171566c98d7341ef6c4c36a1d056b19e24f681e.tar.gz |
openarray/varargs split; breaks bootstrapping
Diffstat (limited to 'compiler/ropes.nim')
-rwxr-xr-x | compiler/ropes.nim | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/ropes.nim b/compiler/ropes.nim index a96438d9c..0107f5241 100755 --- a/compiler/ropes.nim +++ b/compiler/ropes.nim @@ -75,7 +75,7 @@ type proc con*(a, b: PRope): PRope proc con*(a: PRope, b: string): PRope proc con*(a: string, b: PRope): PRope -proc con*(a: openarray[PRope]): PRope +proc con*(a: varargs[PRope]): PRope proc app*(a: var PRope, b: PRope) proc app*(a: var PRope, b: string) proc prepend*(a: var PRope, b: PRope) @@ -84,8 +84,8 @@ proc toRope*(i: BiggestInt): PRope proc ropeLen*(a: PRope): int proc writeRopeIfNotEqual*(r: PRope, filename: string): bool proc ropeToStr*(p: PRope): string -proc ropef*(frmt: TFormatStr, args: openarray[PRope]): PRope -proc appf*(c: var PRope, frmt: TFormatStr, args: openarray[PRope]) +proc ropef*(frmt: TFormatStr, args: varargs[PRope]): PRope +proc appf*(c: var PRope, frmt: TFormatStr, args: varargs[PRope]) proc RopeEqualsFile*(r: PRope, f: string): bool # returns true if the rope r is the same as the contents of file f proc RopeInvariant*(r: PRope): bool @@ -183,7 +183,7 @@ proc con(a, b: PRope): PRope = proc con(a: PRope, b: string): PRope = result = con(a, toRope(b)) proc con(a: string, b: PRope): PRope = result = con(toRope(a), b) -proc con(a: openarray[PRope]): PRope = +proc con(a: varargs[PRope]): PRope = for i in countup(0, high(a)): result = con(result, a[i]) proc toRope(i: BiggestInt): PRope = result = toRope($i) @@ -212,7 +212,7 @@ proc WriteRope*(head: PRope, filename: string, useWarning = false) = rawMessage(if useWarning: warnCannotOpenFile else: errCannotOpenFile, filename) -proc ropef(frmt: TFormatStr, args: openarray[PRope]): PRope = +proc ropef(frmt: TFormatStr, args: varargs[PRope]): PRope = var i = 0 var length = len(frmt) result = nil @@ -254,7 +254,7 @@ proc ropef(frmt: TFormatStr, args: openarray[PRope]): PRope = app(result, substr(frmt, start, i - 1)) assert(RopeInvariant(result)) -proc appf(c: var PRope, frmt: TFormatStr, args: openarray[PRope]) = +proc appf(c: var PRope, frmt: TFormatStr, args: varargs[PRope]) = app(c, ropef(frmt, args)) const |