utopia-rise / godot-kotlin-jvm

Godot Kotlin JVM Module
MIT License
585 stars 38 forks source link

Fix api gen for static methods #482

Closed chippmann closed 1 year ago

chippmann commented 1 year ago

Resolves #477

Static methods are called by passing a nullpointer in the method bind for the instance pointer.

This also fixes a generation issue if the default value is an int with meta uint_32. Previously this was packed in a Int class. But an unsigned 32 bit integer does not fit into a signed 32 bit integer. Hence I changed it to be of type long. (I could not use UInt because of: https://youtrack.jetbrains.com/issue/KT-43525. As UInt is a value class, we can not add the annotation @JVMOverloads to methods using it.)