the doc seem oudated, what is the correct way to d...
# kotlin-native
q
the doc seem oudated, what is the correct way to do kotlinString.cstr.getPointer(nativeHeap /*require autoFreeScope*/) (without writing a C function)
o
what are you trying to do?
inside
memScoped
block externsion property
ptr
shall do
q
I am doing something like this in C. It is not too bad. Just want to check if there is a better way to assign C string.
Copy code
static void lwan_set_key_value(struct key_value *kv, const char *key, const char *value) {
    kv->key = key;
    kv->value = value;
}
nvm, a = memScoped { config.listener.cstr.ptr } works for me now (in different part) (and my code was bug) In case anyone runs into this issue: https://github.com/JetBrains/kotlin-native/issues/1014