Skip to content

Commit

Permalink
nimv2 widestring indexing (#13279)
Browse files Browse the repository at this point in the history
  • Loading branch information
cooldome authored and Araq committed Jan 28, 2020
1 parent fb94836 commit 92010be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/system/widestrs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ when defined(nimv2):
a.bytes = bytes
a.data = cast[typeof(a.data)](allocShared0(bytes))

template `[]`(a: WideCStringObj; idx: int): Utf16Char = a.data[idx]
template `[]=`(a: WideCStringObj; idx: int; val: Utf16Char) = a.data[idx] = val
template `[]`*(a: WideCStringObj; idx: int): Utf16Char = a.data[idx]
template `[]=`*(a: WideCStringObj; idx: int; val: Utf16Char) = a.data[idx] = val

template nullWide(): untyped = WideCStringObj(bytes: 0, data: nil)

Expand Down

0 comments on commit 92010be

Please sign in to comment.