Review feedback
This commit is contained in:
committed by
SvyatoslavScherbina
parent
aecbe0e5f6
commit
35dfb35246
@@ -36,12 +36,7 @@ class AutoFree {
|
|||||||
|
|
||||||
// TODO: this method ignores the encoding
|
// TODO: this method ignores the encoding
|
||||||
KString CreateKotlinStringFromCString(const char* str) {
|
KString CreateKotlinStringFromCString(const char* str) {
|
||||||
int32_t length = strlen(str);
|
return AllocStringInstance(str, strlen(str));
|
||||||
ArrayHeader* result = ArrayContainer(theStringTypeInfo, length).GetPlace();
|
|
||||||
memcpy(
|
|
||||||
ByteArrayAddressOfElementAt(result, 0),
|
|
||||||
str, length);
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
Reference in New Issue
Block a user