You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/06/19 08:59:22 UTC
svn commit: r786394 -
/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Pointer.java
Author: mturk
Date: Fri Jun 19 06:59:21 2009
New Revision: 786394
URL: http://svn.apache.org/viewvc?rev=786394&view=rev
Log:
Add field for default alignment instead directly using numbers
Modified:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Pointer.java
Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Pointer.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Pointer.java?rev=786394&r1=786393&r2=786394&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Pointer.java (original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Pointer.java Fri Jun 19 06:59:21 2009
@@ -22,7 +22,13 @@
* </p>
* @since Runtime 1.0
*/
-public abstract class Pointer {
+public abstract class Pointer
+{
+
+ /**
+ * Default pointer alignment.
+ */
+ public static final int DEFAULT_ALIGNMENT = 8;
/*
* Pointer can only be created from the native code.
@@ -66,7 +72,7 @@
*/
public static final int align(int size)
{
- return align(size, 8);
+ return align(size, DEFAULT_ALIGNMENT);
}
/** Alignment to {@code boundary} function.
@@ -82,7 +88,7 @@
*/
public static final long align(long size)
{
- return align(size, 8);
+ return align(size, DEFAULT_ALIGNMENT);
}
/**