From 7bfb5a62873d4e11ee8a3fa9da759d5bd8006d15 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 12 Jun 2012 16:33:31 -0600 Subject: [PATCH] fix native method name ambiguity sun.misc.Unsafe now has two native getByte methods: one which takes a long and another which takes an Object and a long. Thus, we need to decorate each version with its parameter signature so we don't accidentally call the wrong one at runtime. --- src/classpath-openjdk.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/classpath-openjdk.cpp b/src/classpath-openjdk.cpp index e05a71260e..33c7095807 100644 --- a/src/classpath-openjdk.cpp +++ b/src/classpath-openjdk.cpp @@ -2591,7 +2591,7 @@ Avian_sun_misc_Unsafe_putFloat__Ljava_lang_Object_2JF } extern "C" JNIEXPORT int64_t JNICALL -Avian_sun_misc_Unsafe_getByte +Avian_sun_misc_Unsafe_getByte__Ljava_lang_Object_2J (Thread*, object, uintptr_t* arguments) { object o = reinterpret_cast(arguments[1]); @@ -2601,14 +2601,15 @@ Avian_sun_misc_Unsafe_getByte } extern "C" JNIEXPORT int64_t JNICALL -Avian_sun_misc_Unsafe_getBoolean +Avian_sun_misc_Unsafe_getBoolean__Ljava_lang_Object_2J (Thread* t, object method, uintptr_t* arguments) { - return Avian_sun_misc_Unsafe_getByte(t, method, arguments); + return Avian_sun_misc_Unsafe_getByte__Ljava_lang_Object_2J + (t, method, arguments); } extern "C" JNIEXPORT void JNICALL -Avian_sun_misc_Unsafe_putBoolean +Avian_sun_misc_Unsafe_putBoolean__Ljava_lang_Object_2JZ (Thread*, object, uintptr_t* arguments) { object o = reinterpret_cast(arguments[1]);