mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2026-01-09 01:51:42 +01:00
X11 native get put double
(cherry picked from commitf101bc1108) (cherry picked from commit344fe36ceb)
This commit is contained in:
committed by
Vitaly Provodin
parent
64ee132f06
commit
e3d124653d
@@ -367,6 +367,20 @@ final class Native {
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* Access to C double data(eight bytes)
|
||||
*/
|
||||
static final int DOUBLE_SIZE = 8;
|
||||
static double getDouble(long ptr) { return unsafe.getDouble(ptr); }
|
||||
static double getDouble(long ptr, int index) { return getDouble(ptr + DOUBLE_SIZE * index); }
|
||||
/**
|
||||
* Stores to C double data(eight bytes)
|
||||
*/
|
||||
static void putDouble(long ptr, double data) { unsafe.putDouble(ptr, data); }
|
||||
static void putDouble(long ptr, int index, double data) {
|
||||
putDouble(ptr + index * DOUBLE_SIZE, data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Access to C "unsigned long" date type, which is XID in X
|
||||
|
||||
Reference in New Issue
Block a user