Skip to content

Commit

Permalink
INVALID_HANDLE_VALUE is a long (#1015)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet authored Jun 13, 2024
1 parent 5e876a6 commit 0de32ab
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 4 deletions.
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

0 comments on commit 0de32ab

Please sign in to comment.