summaryrefslogtreecommitdiffstats
path: root/src/java/com/sun/gluegen
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-03-28 19:26:16 +0200
committerSven Gothel <[email protected]>2010-03-28 19:26:16 +0200
commitca2ccb29bd3cd4d9c73ca96ce02402888ac9e9af (patch)
treea06c5ea8b8fbf90c4d4a2affdd9afe882caf6baa /src/java/com/sun/gluegen
parentbe3ddc922fda13c0ba344909b3639a2c78c4b809 (diff)
Merge CPU to Platform
Diffstat (limited to 'src/java/com/sun/gluegen')
-rw-r--r--src/java/com/sun/gluegen/JavaConfiguration.java4
-rw-r--r--src/java/com/sun/gluegen/JavaEmitter.java4
-rw-r--r--src/java/com/sun/gluegen/StructLayout.java2
-rw-r--r--src/java/com/sun/gluegen/test/TestPointerBufferEndian.java4
-rw-r--r--src/java/com/sun/gluegen/test/TestStructAccessorEndian.java4
5 files changed, 9 insertions, 9 deletions
diff --git a/src/java/com/sun/gluegen/JavaConfiguration.java b/src/java/com/sun/gluegen/JavaConfiguration.java
index 3683e29..9f5686b 100644
--- a/src/java/com/sun/gluegen/JavaConfiguration.java
+++ b/src/java/com/sun/gluegen/JavaConfiguration.java
@@ -104,7 +104,7 @@ public class JavaConfiguration {
/**
* The package in which the generated glue code expects to find its
- * run-time helper classes (BufferFactory, CPU,
+ * run-time helper classes (BufferFactory, Platform,
* StructAccessor). Defaults to "com.jogamp.gluegen.runtime".
*/
private String gluegenRuntimePackage = "com.jogamp.gluegen.runtime";
@@ -308,7 +308,7 @@ public class JavaConfiguration {
}
/** Returns the package in which the generated glue code expects to
- find its run-time helper classes (BufferFactory, CPU,
+ find its run-time helper classes (BufferFactory, Platform,
StructAccessor). Defaults to "com.jogamp.gluegen.runtime". */
public String gluegenRuntimePackage() {
return gluegenRuntimePackage;
diff --git a/src/java/com/sun/gluegen/JavaEmitter.java b/src/java/com/sun/gluegen/JavaEmitter.java
index b2f7578..6658a16 100644
--- a/src/java/com/sun/gluegen/JavaEmitter.java
+++ b/src/java/com/sun/gluegen/JavaEmitter.java
@@ -909,7 +909,7 @@ public class JavaEmitter implements GlueEmitter {
}
writer.println(" public static int size() {");
if (doBaseClass) {
- writer.println(" if (CPU.is32Bit()) {");
+ writer.println(" if (Platform.is32Bit()) {");
writer.println(" return " + containingTypeName + "32" + ".size();");
writer.println(" } else {");
writer.println(" return " + containingTypeName + "64" + ".size();");
@@ -925,7 +925,7 @@ public class JavaEmitter implements GlueEmitter {
writer.println(" }");
writer.println();
writer.println(" public static " + containingTypeName + " create(java.nio.ByteBuffer buf) {");
- writer.println(" if (CPU.is32Bit()) {");
+ writer.println(" if (Platform.is32Bit()) {");
writer.println(" return new " + containingTypeName + "32(buf);");
writer.println(" } else {");
writer.println(" return new " + containingTypeName + "64(buf);");
diff --git a/src/java/com/sun/gluegen/StructLayout.java b/src/java/com/sun/gluegen/StructLayout.java
index 7045f89..76cd351 100644
--- a/src/java/com/sun/gluegen/StructLayout.java
+++ b/src/java/com/sun/gluegen/StructLayout.java
@@ -120,7 +120,7 @@ public class StructLayout {
public static StructLayout createForCurrentPlatform() {
- // Note: this code is replicated in CPU.java
+ // Note: this code is replicated in (from?) Platform.java
String os = System.getProperty("os.name").toLowerCase();
String cpu = System.getProperty("os.arch").toLowerCase();
if ((os.startsWith("windows") && cpu.equals("x86"))) {
diff --git a/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java b/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java
index cd9e0cc..9377de7 100644
--- a/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java
+++ b/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java
@@ -8,12 +8,12 @@ public class TestPointerBufferEndian {
public static void main (String[] args) {
boolean direct = args.length>0 && args[0].equals("-direct");
boolean ok = true;
- int bitsPtr = CPU.getPointerSizeInBits();
+ int bitsPtr = Platform.getPointerSizeInBits();
String bitsProp = System.getProperty("sun.arch.data.model");
String os = System.getProperty("os.name");
String cpu = System.getProperty("os.arch");
System.out.println("OS: <"+os+"> CPU: <"+cpu+"> Bits: <"+bitsPtr+"/"+bitsProp+">");
- System.out.println("CPU is: "+ (CPU.is32Bit()?"32":"64") + " bit");
+ System.out.println("CPU is: "+ (Platform.is32Bit()?"32":"64") + " bit");
System.out.println("Buffer is in: "+ (BufferFactory.isLittleEndian()?"little":"big") + " endian");
PointerBuffer ptr = direct ? PointerBuffer.allocateDirect(3) : PointerBuffer.allocate(3);
ptr.put(0, 0x0123456789ABCDEFL);
diff --git a/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java b/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java
index 53ff0ef..9d288b4 100644
--- a/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java
+++ b/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java
@@ -7,12 +7,12 @@ import java.nio.*;
public class TestStructAccessorEndian {
public static void main (String args[]) {
boolean ok = true;
- int bitsPtr = CPU.getPointerSizeInBits();
+ int bitsPtr = Platform.getPointerSizeInBits();
String bitsProp = System.getProperty("sun.arch.data.model");
String os = System.getProperty("os.name");
String cpu = System.getProperty("os.arch");
System.out.println("OS: <"+os+"> CPU: <"+cpu+"> Bits: <"+bitsPtr+"/"+bitsProp+">");
- System.out.println("CPU is: "+ (CPU.is32Bit()?"32":"64") + " bit");
+ System.out.println("CPU is: "+ (Platform.is32Bit()?"32":"64") + " bit");
System.out.println("Buffer is in: "+ (BufferFactory.isLittleEndian()?"little":"big") + " endian");
ByteBuffer tst = BufferFactory.newDirectByteBuffer(BufferFactory.SIZEOF_LONG * 3);
StructAccessor acc = new StructAccessor(tst);