diff options
author | flywind <xzsflywind@gmail.com> | 2021-03-03 08:08:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-03 08:08:52 +0800 |
commit | a04c9d1f6215a52c89e1e641ea2afcf4ce2a90de (patch) | |
tree | cb61282b6661ef2c7872247edde5e8c1143b045a /lib/system | |
parent | 87897fa2d6b5c256606f05af2d0fd74643cce542 (diff) | |
download | Nim-a04c9d1f6215a52c89e1e641ea2afcf4ce2a90de.tar.gz |
rename prepareStrMutation to prepareMutation (#17235)
* remove unnecessary when statement * remove outdated codes * rename prepareStrMutation to prepareMutation
Diffstat (limited to 'lib/system')
-rw-r--r-- | lib/system/strs_v2.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/system/strs_v2.nim b/lib/system/strs_v2.nim index 2647f7dcc..6944cdc58 100644 --- a/lib/system/strs_v2.nim +++ b/lib/system/strs_v2.nim @@ -169,9 +169,9 @@ proc nimPrepareStrMutationV2(s: var NimStringV2) {.compilerRtl, inline.} = if s.p != nil and (s.p.cap and strlitFlag) == strlitFlag: nimPrepareStrMutationImpl(s) -proc prepareStrMutation*(s: var string) {.inline.} = +proc prepareMutation*(s: var string) {.inline.} = # string literals are "copy on write", so you need to call - # `prepareStrMutation` before modifying the strings via `addr`. + # `prepareMutation` before modifying the strings via `addr`. {.cast(noSideEffect).}: let s = unsafeAddr s nimPrepareStrMutationV2(cast[ptr NimStringV2](s)[]) |