mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
implement more sun.misc.Unsafe methods
This commit is contained in:
parent
24f7b42d45
commit
05f26983d0
@ -2627,6 +2627,16 @@ Avian_sun_misc_Unsafe_putByte__JB
|
||||
*reinterpret_cast<int8_t*>(p) = v;
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Avian_sun_misc_Unsafe_putShort__JS
|
||||
(Thread*, object, uintptr_t* arguments)
|
||||
{
|
||||
int64_t p; memcpy(&p, arguments + 1, 8);
|
||||
int16_t v = arguments[3];
|
||||
|
||||
*reinterpret_cast<int16_t*>(p) = v;
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Avian_sun_misc_Unsafe_putLong__JJ
|
||||
(Thread*, object, uintptr_t* arguments)
|
||||
@ -2665,6 +2675,15 @@ Avian_sun_misc_Unsafe_getInt__J
|
||||
return *reinterpret_cast<int32_t*>(p);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT int64_t JNICALL
|
||||
Avian_sun_misc_Unsafe_getLong__J
|
||||
(Thread*, object, uintptr_t* arguments)
|
||||
{
|
||||
int64_t p; memcpy(&p, arguments + 1, 8);
|
||||
|
||||
return *reinterpret_cast<int64_t*>(p);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT int64_t JNICALL
|
||||
Avian_sun_misc_Unsafe_getFloat__J
|
||||
(Thread*, object, uintptr_t* arguments)
|
||||
|
Loading…
Reference in New Issue
Block a user