rename prepareStrMutation to prepareMutation (#17235)
* remove unnecessary when statement * remove outdated codes * rename prepareStrMutation to prepareMutation
This commit is contained in:
parent
87897fa2d6
commit
a04c9d1f62
4 changed files with 10 additions and 10 deletions
|
|
@ -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)[])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue