Skip to content

Commit

Permalink
X
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasblaesing committed Mar 17, 2024
1 parent aa28b65 commit d1fce89
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions native/callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ create_callback(JNIEnv* env, jobject obj, jobject method,
for (i=0;i < argc;i++) {
int jtype;
jclass cls = (*env)->GetObjectArrayElement(env, arg_classes, i);
if (direct && ((cb->conversion_flags[i] = get_conversion_flag(env, cls)) != CVT_DEFAULT)) {
if (((cb->conversion_flags[i] = get_conversion_flag(env, cls)) != CVT_DEFAULT)) {
cb->arg_classes[i] = (*env)->NewWeakGlobalRef(env, cls);
cvt = 1;
}
Expand Down Expand Up @@ -219,8 +219,6 @@ create_callback(JNIEnv* env, jobject obj, jobject method,
if (!direct || !cvt) {
free(cb->conversion_flags);
cb->conversion_flags = NULL;
free(cb->arg_classes);
cb->arg_classes = NULL;
}
if (direct) {
cb->rflag = get_conversion_flag(env, return_class);
Expand Down Expand Up @@ -426,7 +424,7 @@ invoke_callback(JNIEnv* env, callback *cb, ffi_cif* cif, void *resp, void **cbar
*((void **)args[i+3]) = newJavaWString(env, *(void **)cbargs[i]);
break;
case CVT_STRUCTURE:
*((void **)args[i+3]) = newJavaStructure(env, *(void **)cbargs[i], cb->arg_classes[i]);
*((void **)args[i+3]) = newJavaStructure(env, *(void **)cbargs[i], cb-><[i]);
break;
case CVT_STRUCTURE_BYVAL:
args[i+3] = alloca(sizeof(void *));
Expand Down

0 comments on commit d1fce89

Please sign in to comment.