mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8328877: [JNI] The JNI Specification needs to address the limitations of integer UTF-8 String lengths
Reviewed-by: cjplummer, alanb
This commit is contained in:
parent
bbb516163d
commit
90f3f43257
9 changed files with 208 additions and 27 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -775,6 +775,12 @@ struct JNINativeInterface_ {
|
|||
|
||||
jboolean (JNICALL *IsVirtualThread)
|
||||
(JNIEnv* env, jobject obj);
|
||||
|
||||
/* Large UTF8 Support */
|
||||
|
||||
jlong (JNICALL *GetStringUTFLengthAsLong)
|
||||
(JNIEnv *env, jstring str);
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -1623,6 +1629,9 @@ struct JNIEnv_ {
|
|||
jsize GetStringUTFLength(jstring str) {
|
||||
return functions->GetStringUTFLength(this,str);
|
||||
}
|
||||
jlong GetStringUTFLengthAsLong(jstring str) {
|
||||
return functions->GetStringUTFLengthAsLong(this,str);
|
||||
}
|
||||
const char* GetStringUTFChars(jstring str, jboolean *isCopy) {
|
||||
return functions->GetStringUTFChars(this,str,isCopy);
|
||||
}
|
||||
|
@ -1993,6 +2002,7 @@ JNI_OnUnload(JavaVM *vm, void *reserved);
|
|||
#define JNI_VERSION_19 0x00130000
|
||||
#define JNI_VERSION_20 0x00140000
|
||||
#define JNI_VERSION_21 0x00150000
|
||||
#define JNI_VERSION_24 0x00180000
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue