summary refs log tree commit diff stats
path: root/compiler/ropes.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/ropes.nim')
-rwxr-xr-xcompiler/ropes.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/ropes.nim b/compiler/ropes.nim
index b5a273e86..31ec29f0a 100755
--- a/compiler/ropes.nim
+++ b/compiler/ropes.nim
@@ -109,6 +109,9 @@ proc newMutableRope*(capacity = 30): PRope =
   new(result)
   result.data = newStringOfCap(capacity)
 
+proc freezeMutableRope*(r: PRope) {.inline.} =
+  r.length = r.data.len
+
 var 
   cache: array[0..2048 -1, PRope]