From 7e1e2b73a57507e6cb04b25e93228fc10ef689f8 Mon Sep 17 00:00:00 2001 From: Hossein Yousefi Date: Thu, 14 Mar 2024 17:14:33 +0100 Subject: [PATCH] [jnigen] Fix CI (#1012) --- pkgs/jnigen/example/in_app_java/lib/android_utils.dart | 8 ++++---- .../in_app_java/src/android_utils/android_utils.c | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgs/jnigen/example/in_app_java/lib/android_utils.dart b/pkgs/jnigen/example/in_app_java/lib/android_utils.dart index 63ca771c1..d830fd769 100644 --- a/pkgs/jnigen/example/in_app_java/lib/android_utils.dart +++ b/pkgs/jnigen/example/in_app_java/lib/android_utils.dart @@ -2542,19 +2542,19 @@ class Build_Partition extends jni.JObject { return _getBuildTimeMillis(reference.pointer).long; } - static final _equals1 = jniLookup< + static final _equals = jniLookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("Build_Partition__equals1") + ffi.Pointer)>>("Build_Partition__equals") .asFunction< jni.JniResult Function( ffi.Pointer, ffi.Pointer)>(); /// from: public boolean equals(java.lang.Object object) - bool equals1( + bool equals( jni.JObject object, ) { - return _equals1(reference.pointer, object.reference.pointer).boolean; + return _equals(reference.pointer, object.reference.pointer).boolean; } static final _hashCode1 = jniLookup< diff --git a/pkgs/jnigen/example/in_app_java/src/android_utils/android_utils.c b/pkgs/jnigen/example/in_app_java/src/android_utils/android_utils.c index 993aade1e..c9534ec4c 100644 --- a/pkgs/jnigen/example/in_app_java/src/android_utils/android_utils.c +++ b/pkgs/jnigen/example/in_app_java/src/android_utils/android_utils.c @@ -1419,19 +1419,19 @@ JniResult Build_Partition__getBuildTimeMillis(jobject self_) { return (JniResult){.value = {.j = _result}, .exception = check_exception()}; } -jmethodID _m_Build_Partition__equals1 = NULL; +jmethodID _m_Build_Partition__equals = NULL; FFI_PLUGIN_EXPORT -JniResult Build_Partition__equals1(jobject self_, jobject object) { +JniResult Build_Partition__equals(jobject self_, jobject object) { load_env(); load_class_global_ref(&_c_Build_Partition, "android/os/Build$Partition"); if (_c_Build_Partition == NULL) return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Build_Partition, &_m_Build_Partition__equals1, "equals", + load_method(_c_Build_Partition, &_m_Build_Partition__equals, "equals", "(Ljava/lang/Object;)Z"); - if (_m_Build_Partition__equals1 == NULL) + if (_m_Build_Partition__equals == NULL) return (JniResult){.value = {.j = 0}, .exception = check_exception()}; uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_Build_Partition__equals1, object); + jniEnv, self_, _m_Build_Partition__equals, object); return (JniResult){.value = {.z = _result}, .exception = check_exception()}; }