nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sdl2: update window_handle to support Windows and intro display_handle
[nit.git]
/
lib
/
core
/
codecs
/
utf8.nit
diff --git
a/lib/core/codecs/utf8.nit
b/lib/core/codecs/utf8.nit
index
debb3f5
..
43f6235
100644
(file)
--- a/
lib/core/codecs/utf8.nit
+++ b/
lib/core/codecs/utf8.nit
@@
-68,12
+68,12
@@
private class UTF8Codec
end
redef fun decode_string(ns, len) do
end
redef fun decode_string(ns, len) do
- var ret = ns.to_s_with_length(len)
+ var ret = ns.to_s_unsafe(len, copy=false)
var rit = ret.as(FlatString).items
if rit == ns then
var nns = new CString(len)
rit.copy_to(nns, len, 0, 0)
var rit = ret.as(FlatString).items
if rit == ns then
var nns = new CString(len)
rit.copy_to(nns, len, 0, 0)
- return nns.to_s_full(ret.byte_length, ret.length)
+ return nns.to_s_unsafe(ret.byte_length, ret.length, copy=false)
end
return ret
end
end
return ret
end