diff options
author | Jacek Sieka <arnetheduck@gmail.com> | 2015-03-29 12:10:46 +0800 |
---|---|---|
committer | Jacek Sieka <arnetheduck@gmail.com> | 2015-04-01 22:30:39 +0800 |
commit | b4e4ea8d1bcfbccae5a8aa20d8c7e61c09b6f463 (patch) | |
tree | 1a45b3d292a13b5a81219c235ef069e59f6317e6 | |
parent | 97d2df9bac34e01cb3a847909d76a60d8cc085db (diff) | |
download | Nim-b4e4ea8d1bcfbccae5a8aa20d8c7e61c09b6f463.tar.gz |
compiler_ropes: don't expose newRope
-rw-r--r-- | compiler/ccgtypes.nim | 6 | ||||
-rw-r--r-- | compiler/docgen.nim | 2 | ||||
-rw-r--r-- | compiler/ropes.nim | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim index 086aeb966..c46574356 100644 --- a/compiler/ccgtypes.nim +++ b/compiler/ccgtypes.nim @@ -77,13 +77,13 @@ proc mangleName(s: PSym): PRope = # These are not properly scoped now - we need to add blocks # around for loops in transf if keepOrigName: - result = s.name.s.mangle.newRope + result = s.name.s.mangle.toRope else: - app(result, newRope(mangle(s.name.s))) + app(result, toRope(mangle(s.name.s))) app(result, ~"_") app(result, toRope(s.id)) else: - app(result, newRope(mangle(s.name.s))) + app(result, toRope(mangle(s.name.s))) app(result, ~"_") app(result, toRope(s.id)) s.loc.r = result diff --git a/compiler/docgen.nim b/compiler/docgen.nim index 4af69745b..8f9ef4763 100644 --- a/compiler/docgen.nim +++ b/compiler/docgen.nim @@ -635,7 +635,7 @@ proc commandJSON*() = var d = newDocumentor(gProjectFull, options.gConfigVars) d.hasToc = true var json = generateJson(d, ast) - var content = newRope(pretty(json)) + var content = toRope(pretty(json)) if optStdout in gGlobalOptions: writeRope(stdout, content) diff --git a/compiler/ropes.nim b/compiler/ropes.nim index 4194ced95..b4e30c1e7 100644 --- a/compiler/ropes.nim +++ b/compiler/ropes.nim @@ -103,7 +103,7 @@ proc len*(a: PRope): int = if a == nil: result = 0 else: result = a.length -proc newRope*(data: string = nil): PRope = +proc newRope(data: string = nil): PRope = new(result) if data != nil: result.length = len(data) |