Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INVALID_HANDLE_VALUE is a long #1015

Merged
merged 4 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion native/src/main/java/org/jline/nativ/Kernel32.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class Kernel32 {
public static int STD_INPUT_HANDLE;
public static int STD_OUTPUT_HANDLE;
public static int STD_ERROR_HANDLE;
public static int INVALID_HANDLE_VALUE;
public static long INVALID_HANDLE_VALUE;

public static native long malloc(long size);

Expand Down
2 changes: 1 addition & 1 deletion native/src/main/native/kernel32.c
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ JNIEXPORT void JNICALL Kernel32_NATIVE(init)(JNIEnv *env, jclass that)
(*env)->SetStaticIntField(env, that, (*env)->GetStaticFieldID(env, that, "STD_INPUT_HANDLE", "I"), (jint)STD_INPUT_HANDLE);
(*env)->SetStaticIntField(env, that, (*env)->GetStaticFieldID(env, that, "STD_OUTPUT_HANDLE", "I"), (jint)STD_OUTPUT_HANDLE);
(*env)->SetStaticIntField(env, that, (*env)->GetStaticFieldID(env, that, "STD_ERROR_HANDLE", "I"), (jint)STD_ERROR_HANDLE);
(*env)->SetStaticIntField(env, that, (*env)->GetStaticFieldID(env, that, "INVALID_HANDLE_VALUE", "I"), (jint)INVALID_HANDLE_VALUE);
(*env)->SetStaticLongField(env, that, (*env)->GetStaticFieldID(env, that, "INVALID_HANDLE_VALUE", "J"), (jlong)INVALID_HANDLE_VALUE);
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
{ "name": "STD_INPUT_HANDLE" },
{ "name": "STD_OUTPUT_HANDLE" },
{ "name": "STD_ERROR_HANDLE" },
{ "name": "INVALID_HANDLE_VALUE," }
{ "name": "INVALID_HANDLE_VALUE" }
]
},
{
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ final class Kernel32 {

public static final int FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000;

public static final int INVALID_HANDLE_VALUE = -1;
public static final long INVALID_HANDLE_VALUE = -1;
public static final int STD_INPUT_HANDLE = -10;
public static final int STD_OUTPUT_HANDLE = -11;
public static final int STD_ERROR_HANDLE = -12;
Expand Down