Skip to content

Commit

Permalink
constify JNINativeMethod tables
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed Aug 25, 2019
1 parent 5061ce5 commit 77c9fa9
Show file tree
Hide file tree
Showing 57 changed files with 62 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
static void NativeTestTarget_emptyJniStaticSynchronizedMethod0(JNIEnv*, jclass) { }
static void NativeTestTarget_emptyJniSynchronizedMethod0(JNIEnv*, jclass) { }

static JNINativeMethod gMethods_NormalOnly[] = {
static const JNINativeMethod gMethods_NormalOnly[] = {
NATIVE_METHOD(NativeTestTarget, emptyJniStaticSynchronizedMethod0, "()V"),
NATIVE_METHOD(NativeTestTarget, emptyJniSynchronizedMethod0, "()V"),
};
Expand All @@ -36,7 +36,7 @@ static void NativeTestTarget_emptyJniStaticMethod6L(JNIEnv*, jclass, jobject, ja
static void NativeTestTarget_emptyJniStaticMethod0(JNIEnv*, jclass) { }
static void NativeTestTarget_emptyJniStaticMethod6(JNIEnv*, jclass, int, int, int, int, int, int) { }

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(NativeTestTarget, emptyJniMethod0, "()V"),
NATIVE_METHOD(NativeTestTarget, emptyJniMethod6, "(IIIIII)V"),
NATIVE_METHOD(NativeTestTarget, emptyJniMethod6L, "(Ljava/lang/String;[Ljava/lang/String;[[ILjava/lang/Object;[Ljava/lang/Object;[[[[Ljava/lang/Object;)V"),
Expand All @@ -53,7 +53,7 @@ static void NativeTestTarget_emptyJniStaticMethod6L_Fast(JNIEnv*, jclass, jobjec
static void NativeTestTarget_emptyJniStaticMethod0_Fast(JNIEnv*, jclass) { }
static void NativeTestTarget_emptyJniStaticMethod6_Fast(JNIEnv*, jclass, int, int, int, int, int, int) { }

static JNINativeMethod gMethods_Fast[] = {
static const JNINativeMethod gMethods_Fast[] = {
NATIVE_METHOD(NativeTestTarget, emptyJniMethod0_Fast, "()V"),
NATIVE_METHOD(NativeTestTarget, emptyJniMethod6_Fast, "(IIIIII)V"),
NATIVE_METHOD(NativeTestTarget, emptyJniMethod6L_Fast, "(Ljava/lang/String;[Ljava/lang/String;[[ILjava/lang/Object;[Ljava/lang/Object;[[[[Ljava/lang/Object;)V"),
Expand All @@ -66,7 +66,7 @@ static JNINativeMethod gMethods_Fast[] = {
static void NativeTestTarget_emptyJniStaticMethod0_Critical() { }
static void NativeTestTarget_emptyJniStaticMethod6_Critical( int, int, int, int, int, int) { }

static JNINativeMethod gMethods_Critical[] = {
static const JNINativeMethod gMethods_Critical[] = {
NATIVE_METHOD(NativeTestTarget, emptyJniStaticMethod0_Critical, "()V"),
NATIVE_METHOD(NativeTestTarget, emptyJniStaticMethod6_Critical, "(IIIIII)V"),
};
Expand Down
2 changes: 1 addition & 1 deletion luni/src/main/native/android_system_OsConstants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ static void OsConstants_initConstants(JNIEnv* env, jclass c) {
initConstant(env, c, "_SC_XOPEN_XCU_VERSION", _SC_XOPEN_XCU_VERSION);
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(OsConstants, initConstants, "()V"),
};
void register_android_system_OsConstants(JNIEnv* env) {
Expand Down
2 changes: 1 addition & 1 deletion luni/src/main/native/java_lang_StringToReal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ static jdouble StringToReal_parseDblImpl(JNIEnv* env, jclass, jstring s, jint e)
return createDouble(env, str.c_str(), e);
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(StringToReal, parseFltImpl, "(Ljava/lang/String;I)F"),
NATIVE_METHOD(StringToReal, parseDblImpl, "(Ljava/lang/String;I)D"),
};
Expand Down
2 changes: 1 addition & 1 deletion luni/src/main/native/java_lang_invoke_MethodHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static void MethodHandle_invoke(JNIEnv* env, jobject, jobjectArray) {
"MethodHandle.invoke cannot be invoked reflectively.");
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(MethodHandle, invokeExact, "([Ljava/lang/Object;)Ljava/lang/Object;"),
NATIVE_METHOD(MethodHandle, invoke, "([Ljava/lang/Object;)Ljava/lang/Object;"),
};
Expand Down
2 changes: 1 addition & 1 deletion luni/src/main/native/java_lang_invoke_VarHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ static void VarHandle_weakCompareAndSetRelease(JNIEnv* env, jobject, jobjectArra
ThrowUnsupportedOperationForAccessMode(env, "weakCompareAndSetRelease");
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(VarHandle, compareAndExchange, kVarHandleObjectSignature),
NATIVE_METHOD(VarHandle, compareAndExchangeAcquire, kVarHandleObjectSignature),
NATIVE_METHOD(VarHandle, compareAndExchangeRelease, kVarHandleObjectSignature),
Expand Down
2 changes: 1 addition & 1 deletion luni/src/main/native/java_math_NativeBN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ static jboolean NativeBN_BN_primality_test(JNIEnv* env, jclass, jlong candidate,
return is_probably_prime ? JNI_TRUE : JNI_FALSE;
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(NativeBN, BN_add, "(JJJ)V"),
NATIVE_METHOD(NativeBN, BN_add_word, "(JI)V"),
NATIVE_METHOD(NativeBN, BN_bin2bn, "([BIZJ)V"),
Expand Down
2 changes: 1 addition & 1 deletion luni/src/main/native/java_util_regex_Matcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ static jint Matcher_getMatchedGroupIndex0(JNIEnv* env, jclass, jlong patternAddr
}


static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(Matcher, getMatchedGroupIndex0, "(JLjava/lang/String;)I"),
NATIVE_METHOD(Matcher, findImpl, "(JI[I)Z"),
NATIVE_METHOD(Matcher, findNextImpl, "(J[I)Z"),
Expand Down
2 changes: 1 addition & 1 deletion luni/src/main/native/java_util_regex_Pattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static jlong Pattern_compileImpl(JNIEnv* env, jclass, jstring javaRegex, jint fl
return static_cast<jlong>(reinterpret_cast<uintptr_t>(result));
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(Pattern, compileImpl, "(Ljava/lang/String;I)J"),
NATIVE_METHOD(Pattern, getNativeFinalizer, "()J"),
NATIVE_METHOD(Pattern, nativeSize, "()I"),
Expand Down
2 changes: 1 addition & 1 deletion luni/src/main/native/libcore_icu_ICU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ static jstring ICU_getDefaultLocale(JNIEnv* env, jclass) {
return env->NewStringUTF(icu::Locale::getDefault().getName());
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(ICU, addLikelySubtags, "(Ljava/lang/String;)Ljava/lang/String;"),
NATIVE_METHOD(ICU, getAvailableBreakIteratorLocalesNative, "()[Ljava/lang/String;"),
NATIVE_METHOD(ICU, getAvailableCalendarLocalesNative, "()[Ljava/lang/String;"),
Expand Down
2 changes: 1 addition & 1 deletion luni/src/main/native/libcore_icu_NativeConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ static jlong NativeConverter_getNativeSize(JNIEnv*, jclass, jstring) {
return 200;
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(NativeConverter, charsetForName, "(Ljava/lang/String;)Ljava/nio/charset/Charset;"),
NATIVE_METHOD(NativeConverter, closeConverter, "(J)V"),
NATIVE_METHOD(NativeConverter, contains, "(Ljava/lang/String;Ljava/lang/String;)Z"),
Expand Down
2 changes: 1 addition & 1 deletion luni/src/main/native/libcore_icu_TimeZoneNames.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static void TimeZoneNames_fillZoneStrings(JNIEnv* env, jclass, jstring javaLocal
}
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(TimeZoneNames, fillZoneStrings, "(Ljava/lang/String;[[Ljava/lang/String;)V"),
};
void register_libcore_icu_TimeZoneNames(JNIEnv* env) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static void AsynchronousCloseMonitor_signalBlockedThreads(JNIEnv* env, jclass, j
AsynchronousCloseMonitor::signalBlockedThreads(fd);
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(AsynchronousCloseMonitor, signalBlockedThreads, "(Ljava/io/FileDescriptor;)V"),
};
void register_libcore_io_AsynchronousCloseMonitor(JNIEnv* env) {
Expand Down
2 changes: 1 addition & 1 deletion luni/src/main/native/libcore_io_Linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2464,7 +2464,7 @@ static jint Linux_writev(JNIEnv* env, jobject, jobject javaFd, jobjectArray buff
#define NATIVE_METHOD_OVERLOAD(className, functionName, signature, variant) \
{ #functionName, signature, reinterpret_cast<void*>(className ## _ ## functionName ## variant) }

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(Linux, accept, "(Ljava/io/FileDescriptor;Ljava/net/SocketAddress;)Ljava/io/FileDescriptor;"),
NATIVE_METHOD(Linux, access, "(Ljava/lang/String;I)Z"),
NATIVE_METHOD(Linux, android_getaddrinfo, "(Ljava/lang/String;Landroid/system/StructAddrinfo;I)[Ljava/net/InetAddress;"),
Expand Down
2 changes: 1 addition & 1 deletion luni/src/main/native/libcore_io_Memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ static void Memory_unsafeBulkPut(JNIEnv* env, jclass, jbyteArray dstArray, jint
env->ReleasePrimitiveArrayCritical(srcArray, srcBytes, 0);
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(Memory, memmove, "(Ljava/lang/Object;ILjava/lang/Object;IJ)V"),
FAST_NATIVE_METHOD(Memory, peekByte, "(J)B"),
NATIVE_METHOD(Memory, peekByteArray, "(J[BII)V"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static void NativeAllocationRegistry_applyFreeFunction(JNIEnv*,
nativeFreeFunction(nativePtr);
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(NativeAllocationRegistry, applyFreeFunction, "(JJ)V"),
};

Expand Down
4 changes: 2 additions & 2 deletions luni/src/main/native/org_apache_harmony_xml_ExpatParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,7 @@ static void ExpatParser_staticInitialize(JNIEnv* env, jobject classObject, jstri
emptyString = reinterpret_cast<jstring>(env->NewGlobalRef(empty));
}

static JNINativeMethod parserMethods[] = {
static const JNINativeMethod parserMethods[] = {
NATIVE_METHOD(ExpatParser, appendString, "(JLjava/lang/String;Z)V"),
NATIVE_METHOD(ExpatParser, appendBytes, "(J[BII)V"),
NATIVE_METHOD(ExpatParser, appendChars, "(J[CII)V"),
Expand All @@ -1367,7 +1367,7 @@ static JNINativeMethod parserMethods[] = {
NATIVE_METHOD(ExpatParser, staticInitialize, "(Ljava/lang/String;)V"),
};

static JNINativeMethod attributeMethods[] = {
static const JNINativeMethod attributeMethods[] = {
NATIVE_METHOD(ExpatAttributes, freeAttributes, "(J)V"),
NATIVE_METHOD(ExpatAttributes, getIndexForQName, "(JLjava/lang/String;)I"),
NATIVE_METHOD(ExpatAttributes, getIndex, "(JLjava/lang/String;Ljava/lang/String;)I"),
Expand Down
2 changes: 1 addition & 1 deletion luni/src/main/native/sun_misc_Unsafe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static jobject Unsafe_allocateInstance(JNIEnv* env, jclass, jclass c) {
return env->AllocObject(c);
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(Unsafe, allocateInstance, "(Ljava/lang/Class;)Ljava/lang/Object;"),
};
void register_sun_misc_Unsafe(JNIEnv* env) {
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/Adler32.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Java_java_util_zip_Adler32_updateByteBuffer(JNIEnv *env, jclass cls, jint adler,
return adler;
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(Adler32, update, "(II)I"),
NATIVE_METHOD(Adler32, updateBytes, "(I[BII)I"),
NATIVE_METHOD(Adler32, updateByteBuffer, "(IJII)I"),
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/Bits.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ Java_java_nio_Bits_copyToLongArray(JNIEnv *env, jobject this, jlong srcAddr,
}
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(Bits, copyFromShortArray, "(Ljava/lang/Object;JJJ)V"),
NATIVE_METHOD(Bits, copyToShortArray, "(JLjava/lang/Object;JJ)V"),
NATIVE_METHOD(Bits, copyFromIntArray, "(Ljava/lang/Object;JJJ)V"),
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/Character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Character_getNameImpl(JNIEnv* env, jclass, jint codePoint) {
return (U_FAILURE(status) || byteCount == 0) ? NULL : env->NewStringUTF(buf);
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
FAST_NATIVE_METHOD(Character, digitImpl, "(II)I"),
FAST_NATIVE_METHOD(Character, getDirectionalityImpl, "(I)B"),
NATIVE_METHOD(Character, getNameImpl, "(I)Ljava/lang/String;"),
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/Console_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Java_java_io_Console_echo(JNIEnv *env,
return old;
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(Console, istty, "()Z"),
NATIVE_METHOD(Console, encoding, "()Ljava/lang/String;"),
NATIVE_METHOD(Console, echo, "(Z)Z"),
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/DatagramChannelImpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ Java_sun_nio_ch_DatagramChannelImpl_send0(JNIEnv *env, jobject this,
return n;
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(DatagramChannelImpl, initIDs, "()V"),
NATIVE_METHOD(DatagramChannelImpl, disconnect0, "(Ljava/io/FileDescriptor;Z)V"),
NATIVE_METHOD(DatagramChannelImpl, receive0, "(Ljava/io/FileDescriptor;JIZ)I"),
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/DatagramDispatcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Java_sun_nio_ch_DatagramDispatcher_writev0(JNIEnv *env, jclass clazz,
return convertLongReturnVal(env, (jlong)result, JNI_FALSE);
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(DatagramDispatcher, read0, "(Ljava/io/FileDescriptor;JI)I"),
NATIVE_METHOD(DatagramDispatcher, readv0, "(Ljava/io/FileDescriptor;JI)J"),
NATIVE_METHOD(DatagramDispatcher, write0, "(Ljava/io/FileDescriptor;JI)I"),
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/Double.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Double_doubleToRawLongBits(JNIEnv *env, jclass unused, jdouble v)
u.d = (double)v;
return u.l;
}
static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(Double, longBitsToDouble, "(J)D"),
NATIVE_METHOD(Double, doubleToRawLongBits, "(D)J"),
};
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/FileChannelImpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ FileChannelImpl_transferTo0(JNIEnv *env, jobject this,
#endif
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(FileChannelImpl, initIDs, "()J"),
NATIVE_METHOD(FileChannelImpl, map0, "(IJJ)J"),
NATIVE_METHOD(FileChannelImpl, unmap0, "(JJ)I"),
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/FileDescriptor_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ JNIEXPORT jboolean JNICALL FileDescriptor_isSocket(JNIEnv *env, jclass ignored,
return TEMP_FAILURE_RETRY(getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &error_length)) == 0;
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(FileDescriptor, sync, "()V"),
NATIVE_METHOD(FileDescriptor, isSocket, "(I)Z"),
};
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/FileDispatcherImpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ FileDispatcherImpl_closeIntFD(JNIEnv *env, jclass clazz, jint fd)
closeFileDescriptor(env, fd);
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(FileDispatcherImpl, closeIntFD, "(I)V"),
NATIVE_METHOD(FileDispatcherImpl, preClose0, "(Ljava/io/FileDescriptor;)V"),
NATIVE_METHOD(FileDispatcherImpl, close0, "(Ljava/io/FileDescriptor;)V"),
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/FileInputStream.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ FileInputStream_available0(JNIEnv *env, jobject this) {
return 0;
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(FileInputStream, open0, "(Ljava/lang/String;)V"),
NATIVE_METHOD(FileInputStream, skip0, "(J)J"),
NATIVE_METHOD(FileInputStream, available0, "()I"),
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/FileKey.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ FileKey_init(JNIEnv *env, jobject this, jobject fdo)
}
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(FileKey, init, "(Ljava/io/FileDescriptor;)V"),
};

Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/FileOutputStream_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ FileOutputStream_open0(JNIEnv *env, jobject this,
O_WRONLY | O_CREAT | (append ? O_APPEND : O_TRUNC));
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(FileOutputStream, open0, "(Ljava/lang/String;Z)V"),
};

Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/FileSystemPreferences.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Java_java_util_prefs_FileSystemPreferences_unlockFile0(JNIEnv *env,
return 0;
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(FileSystemPreferences, lockFile0, "(Ljava/lang/String;IZ)[I"),
NATIVE_METHOD(FileSystemPreferences, unlockFile0, "(I)I"),
NATIVE_METHOD(FileSystemPreferences, chmod, "(Ljava/lang/String;I)I"),
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/Float.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Float_floatToRawIntBits(JNIEnv *env, jclass unused, jfloat v)
u.f = (float)v;
return (jint)u.i;
}
static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(Float, intBitsToFloat, "(I)F"),
NATIVE_METHOD(Float, floatToRawIntBits, "(F)I"),
};
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/IOUtil.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ fdval(JNIEnv *env, jobject fdo)
return (*env)->GetIntField(env, fdo, fd_fdID);
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(IOUtil, iovMax, "()I"),
NATIVE_METHOD(IOUtil, fdLimit, "()I"),
NATIVE_METHOD(IOUtil, drain, "(I)Z"),
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/MappedByteBuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Java_java_nio_MappedByteBuffer_force0(JNIEnv *env, jobject obj, jobject fdo,
}


static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(MappedByteBuffer, isLoaded0, "(JJI)Z"),
NATIVE_METHOD(MappedByteBuffer, load0, "(JJ)V"),
NATIVE_METHOD(MappedByteBuffer, force0, "(Ljava/io/FileDescriptor;JJ)V"),
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/Math.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Math_rint(jdouble d) {
return rint(d);
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
FAST_NATIVE_METHOD(Math, IEEEremainder, "(DD)D"),
FAST_NATIVE_METHOD(Math, acos, "(D)D"),
FAST_NATIVE_METHOD(Math, asin, "(D)D"),
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/NativeThread.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ NativeThread_signal(JNIEnv *env, jclass cl, jlong thread)
JNU_ThrowIOExceptionWithLastError(env, "Thread signal failed");
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(NativeThread, current, "()J"),
NATIVE_METHOD(NativeThread, signal, "(J)V"),
};
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/Net.c
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ handleSocketError(JNIEnv *env, jint errorValue) {
}


static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(Net, isIPv6Available0, "()Z"),
NATIVE_METHOD(Net, isExclusiveBindAvailable, "()I"),
NATIVE_METHOD(Net, canIPv6SocketJoinIPv4Group0, "()Z"),
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/ObjectInputStream.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ Java_java_io_ObjectInputStream_bytesToDoubles(JNIEnv *env,
(*env)->ReleasePrimitiveArrayCritical(env, dst, doubles, 0);
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(ObjectInputStream, bytesToFloats, "([BI[FII)V"),
NATIVE_METHOD(ObjectInputStream, bytesToDoubles, "([BI[DII)V"),
};
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/ObjectOutputStream.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Java_java_io_ObjectOutputStream_doublesToBytes(JNIEnv *env,
(*env)->ReleasePrimitiveArrayCritical(env, dst, bytes, 0);
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(ObjectOutputStream, floatsToBytes, "([FI[BII)V"),
NATIVE_METHOD(ObjectOutputStream, doublesToBytes, "([DI[BII)V"),
};
Expand Down
2 changes: 1 addition & 1 deletion ojluni/src/main/native/ObjectStreamClass.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ ObjectStreamClass_hasStaticInitializer(JNIEnv *env, jclass this,
return (clinitId != superClinitId);
}

static JNINativeMethod gMethods[] = {
static const JNINativeMethod gMethods[] = {
NATIVE_METHOD(ObjectStreamClass, hasStaticInitializer, "(Ljava/lang/Class;Z)Z"),
};

Expand Down
Loading

0 comments on commit 77c9fa9

Please sign in to comment.