Hello! I'm working on a GTK library in kotlin nati...
# kotlin-native
c
Hello! I'm working on a GTK library in kotlin native. It's been difficult as I have been mostly stumbling upon solutions at random. I have the following code
Copy code
val int1: CValue<IntVarOf<Int>> = cValue()
val int2: CValue<IntVarOf<Int>> = cValue()

gtk_window_get_default_size(
	window = windowPointer,
	width = int1,
	height = int2
)
gtk_window_get_default_size
takes in a pointer to the window, then a pointer to `Int`s that it will populate. How can I get the
Int
out of
CValue<IntVarOf<Int>>
?
1
a
Copy code
val intValue1 = memScoped {  
            int1.ptr.pointed.value
        }
🙌 1
c
Thanks!
b
does that copy the value?
as in, if
int1.ptr.pointed.value
changes will
intValue
be updated as well?
a
message has been deleted
does that copy the value?
Int always is copied