Skip to content

Commit

Permalink
Fix JNI signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
CedNaru committed Sep 14, 2024
1 parent f82ec23 commit 21283d1
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 13 deletions.
3 changes: 1 addition & 2 deletions harness/tests/scripts/CoreTypePropertyChecks.gdj
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ signals = [
]
properties = [
exported_normal_core_type,
normal_core_type,
normal_non_null_core_type
normal_core_type
]
functions = [

Expand Down
2 changes: 0 additions & 2 deletions harness/tests/scripts/godot/tests/Invocation.gdj
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,5 @@ functions = [
set_vector3_in_packed_array,
resize_vector3_packed_array,
is_sent_xr_same_instance_as_jvm_singleton,
nullable_string_is_null,
nullable_return_type,
create_variant_array_of_user_type
]
4 changes: 3 additions & 1 deletion harness/tests/scripts/godot/tests/JavaTestClass.gdj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ properties = [
exported_string,
exported_byte,
exported_button,
signal_emitted
signal_emitted,
variant_array,
dictionary
]
functions = [
greeting,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
{ "name" : "engine_call_constructor", "parameterTypes" : [] },

{ "name" : "engine_call_constructor_object_string_name", "parameterTypes" : [] },
{ "name" : "engine_call_constructor_kt_custom_callable", "parameterTypes" : ["godot.core.callable.KtCallable", "int", "int"] },
{ "name" : "engine_call_constructor_kt_custom_callable", "parameterTypes" : ["godot.core.KtCallable", "int", "int"] },
{ "name" : "engine_call_copy_constructor", "parameterTypes" : [] },

{ "name" : "engine_call_bind", "parameterTypes" : ["long"] },
Expand All @@ -192,12 +192,12 @@
]
},
{
"name" : "godot.core.callable.KtCallable$Bridge",
"name" : "godot.core.KtCallable$Bridge",
"fields" : [
{ "name" : "INSTANCE" }
],
"methods" : [
{ "name" : "wrap_in_custom_callable", "parameterTypes" : ["godot.core.callable.KtCallable", "int", "int"] }
{ "name" : "wrap_in_custom_callable", "parameterTypes" : ["godot.core.KtCallable", "int", "int"] }
]
},
{
Expand Down Expand Up @@ -728,7 +728,7 @@
]
},
{
"name":"godot.core.callable.KtCallable",
"name":"godot.core.KtCallable",
"methods":[
{"name":"getParameterCount","parameterTypes":[] },
{"name":"invokeNoReturn","parameterTypes":[] },
Expand Down
2 changes: 1 addition & 1 deletion src/jvm_wrapper/bridge/callable_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace bridges {
INIT_JNI_BINDINGS(
INIT_NATIVE_METHOD("engine_call_constructor", "()J", CallableBridge::engine_call_constructor)
INIT_NATIVE_METHOD("engine_call_constructor_object_string_name", "()J", CallableBridge::engine_call_constructor_object_string_name)
INIT_NATIVE_METHOD("engine_call_constructor_kt_custom_callable", "(Lgodot/core/callable/KtCallable;II)J", CallableBridge::engine_call_constructor_kt_custom_callable)
INIT_NATIVE_METHOD("engine_call_constructor_kt_custom_callable", "(Lgodot/core/KtCallable;II)J", CallableBridge::engine_call_constructor_kt_custom_callable)
INIT_NATIVE_METHOD("engine_call_copy_constructor", "()J", CallableBridge::engine_call_copy_constructor)
INIT_NATIVE_METHOD("engine_call_bind", "(J)V", CallableBridge::engine_call_bind)
INIT_NATIVE_METHOD("engine_call_bindv", "(J)V", CallableBridge::engine_call_bindv)
Expand Down
4 changes: 2 additions & 2 deletions src/jvm_wrapper/bridge/kt_callable_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
#include "jvm_wrapper/jvm_singleton_wrapper.h"

namespace bridges {
JVM_SINGLETON_WRAPPER(KtCallableBridge, "godot.core.callable.KtCallable$Bridge") {
JVM_SINGLETON_WRAPPER(KtCallableBridge, "godot.core.KtCallable$Bridge") {
SINGLETON_CLASS(KtCallableBridge)

// clang-format off
INIT_JNI_BINDINGS(
INIT_NATIVE_METHOD("wrap_in_custom_callable", "(Lgodot/core/callable/KtCallable;II)J", KtCallableBridge::wrap_in_custom_callable)
INIT_NATIVE_METHOD("wrap_in_custom_callable", "(Lgodot/core/KtCallable;II)J", KtCallableBridge::wrap_in_custom_callable)
)
// clang-format on

Expand Down
2 changes: 1 addition & 1 deletion src/kotlin_callable_custom.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "jvm_wrapper/jvm_instance_wrapper.h"
#include "core/variant/callable.h"

JVM_INSTANCE_WRAPPER(KtCallable, "godot.core.callable.KtCallable") {
JVM_INSTANCE_WRAPPER(KtCallable, "godot.core.KtCallable") {
JVM_CLASS(KtCallable)
// clang-format off

Expand Down

0 comments on commit 21283d1

Please sign in to comment.