utopia-rise / godot-kotlin-native

Kotlin bindings for Godot Engine
MIT License
290 stars 16 forks source link

reinterpret retvar as godot_string and then convert it to Kotlin String in icalls returning String #181

Closed piiertho closed 4 years ago

piiertho commented 4 years ago

We were trying to convert a pointer to KString, this fixes this behaviour by first reinterpret pointer as godot_string, then read its value and anding by converting value to Kotlin String.

CedNaru commented 4 years ago

I'm a bit confused, isn't Godot supposed to return us a Variant in any case, not directly a Godot_string ?

raniejade commented 4 years ago

Yeah, I thought it was a godot_variant not a godot_string. Can you confirm @piiertho?

piiertho commented 4 years ago

I have a better way to do, will be fixed with rework of allocations in icalls.