Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
Merge upstream-jdk
Browse files Browse the repository at this point in the history
  • Loading branch information
corretto-github-robot committed May 3, 2024
2 parents 3408e06 + d2e1ea4 commit 6d17cd5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions src/jdk.internal.le/linux/native/lible/CLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,20 +150,20 @@ JNIEXPORT void JNICALL Java_jdk_internal_org_jline_terminal_impl_jna_linux_CLibr
(JNIEnv *env, jobject, jint fd, jint cmd, jobject data) {
winsize ws;

ws.ws_row = env->GetIntField(data, ws_row);
ws.ws_col = env->GetIntField(data, ws_col);
ws.ws_xpixel = env->GetIntField(data, ws_xpixel);
ws.ws_ypixel = env->GetIntField(data, ws_ypixel);
ws.ws_row = env->GetShortField(data, ws_row);
ws.ws_col = env->GetShortField(data, ws_col);
ws.ws_xpixel = env->GetShortField(data, ws_xpixel);
ws.ws_ypixel = env->GetShortField(data, ws_ypixel);

if (ioctl(fd, cmd, &ws) != 0) {
throw_errno(env);
return ;
}

env->SetIntField(data, ws_row, ws.ws_row);
env->SetIntField(data, ws_col, ws.ws_col);
env->SetIntField(data, ws_xpixel, ws.ws_xpixel);
env->SetIntField(data, ws_ypixel, ws.ws_ypixel);
env->SetShortField(data, ws_row, ws.ws_row);
env->SetShortField(data, ws_col, ws.ws_col);
env->SetShortField(data, ws_xpixel, ws.ws_xpixel);
env->SetShortField(data, ws_ypixel, ws.ws_ypixel);
}

/*
Expand Down
16 changes: 8 additions & 8 deletions src/jdk.internal.le/macosx/native/lible/CLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,20 +154,20 @@ JNIEXPORT void JNICALL Java_jdk_internal_org_jline_terminal_impl_jna_osx_CLibrar
(JNIEnv *env, jobject, jint fd, jlong cmd, jobject data) {
winsize ws;

ws.ws_row = env->GetIntField(data, ws_row);
ws.ws_col = env->GetIntField(data, ws_col);
ws.ws_xpixel = env->GetIntField(data, ws_xpixel);
ws.ws_ypixel = env->GetIntField(data, ws_ypixel);
ws.ws_row = env->GetShortField(data, ws_row);
ws.ws_col = env->GetShortField(data, ws_col);
ws.ws_xpixel = env->GetShortField(data, ws_xpixel);
ws.ws_ypixel = env->GetShortField(data, ws_ypixel);

if (ioctl(fd, cmd, &ws) != 0) {
throw_errno(env);
return ;
}

env->SetIntField(data, ws_row, ws.ws_row);
env->SetIntField(data, ws_col, ws.ws_col);
env->SetIntField(data, ws_xpixel, ws.ws_xpixel);
env->SetIntField(data, ws_ypixel, ws.ws_ypixel);
env->SetShortField(data, ws_row, ws.ws_row);
env->SetShortField(data, ws_col, ws.ws_col);
env->SetShortField(data, ws_xpixel, ws.ws_xpixel);
env->SetShortField(data, ws_ypixel, ws.ws_ypixel);
}

/*
Expand Down

0 comments on commit 6d17cd5

Please sign in to comment.