Hide nativeMemUtils and pointerSize

This commit is contained in:
Svyatoslav Scherbina
2017-09-15 11:39:16 +03:00
committed by SvyatoslavScherbina
parent 388aba5040
commit d8ed1f4414
5 changed files with 18 additions and 10 deletions
@@ -31,8 +31,7 @@ class CUrl(val url: String) {
}
fun CPointer<ByteVar>.toKString(length: Int): String {
val bytes = ByteArray(length)
nativeMemUtils.getByteArray(pointed, bytes, length)
val bytes = this.readBytes(length)
return kotlin.text.fromUtf8Array(bytes, 0, bytes.size)
}