Review feedback

This commit is contained in:
Svyatoslav Scherbina
2016-12-02 13:09:09 +07:00
committed by SvyatoslavScherbina
parent aecbe0e5f6
commit 35dfb35246
+1 -6
View File
@@ -36,12 +36,7 @@ class AutoFree {
// TODO: this method ignores the encoding
KString CreateKotlinStringFromCString(const char* str) {
int32_t length = strlen(str);
ArrayHeader* result = ArrayContainer(theStringTypeInfo, length).GetPlace();
memcpy(
ByteArrayAddressOfElementAt(result, 0),
str, length);
return result;
return AllocStringInstance(str, strlen(str));
}
#ifdef __cplusplus