summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorflywind <43030857+xflywind@users.noreply.github.com>2020-11-05 21:00:49 +0800
committerGitHub <noreply@github.com>2020-11-05 14:00:49 +0100
commit8e1fa84b0d44bc6fb995992becf659d62b36713a (patch)
treedf2d3cbb21d0103dff231197bc9d4ee8e18420ea /lib
parenta8af664e8ba8672e736c72971a18c0e00ba9b086 (diff)
downloadNim-8e1fa84b0d44bc6fb995992becf659d62b36713a.tar.gz
fix #15663 (#15839) [backport:1.4]
Diffstat (limited to 'lib')
-rw-r--r--lib/system/widestrs.nim7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/system/widestrs.nim b/lib/system/widestrs.nim
index 6d54bce9b..955fab46a 100644
--- a/lib/system/widestrs.nim
+++ b/lib/system/widestrs.nim
@@ -214,3 +214,10 @@ proc `$`*(w: WideCString, estimate: int, replacement: int = 0xFFFD): string =
 
 proc `$`*(s: WideCString): string =
   result = s $ 80
+
+when defined(nimv2):
+  proc `$`*(s: WideCStringObj, estimate: int, replacement: int = 0xFFFD): string =
+    `$`(s.data, estimate, replacement)
+
+  proc `$`*(s: WideCStringObj): string =
+    $(s.data)