openarray/varargs split; breaks bootstrapping

This commit is contained in:
Araq 2012-08-16 08:34:33 +02:00
commit 0171566c98
29 changed files with 228 additions and 175 deletions

View file

@ -1112,6 +1112,13 @@ proc `%` *(formatstr, a: string): string {.noSideEffect,
## This is the same as ``formatstr % [a]``.
result = newStringOfCap(formatstr.len + a.len)
addf(result, formatstr, [a])
proc format*(formatstr: string, a: varargs[string, `$`]): string {.noSideEffect,
rtl, extern: "nsuFormatVarargs".} =
## This is the same as ``formatstr % a`` except that it supports
## auto stringification.
result = newStringOfCap(formatstr.len + a.len)
addf(result, formatstr, a)
{.pop.}