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 2011/04/12 10:32:39 UTC
svn commit: r1091323 - in /commons/sandbox/runtime/trunk/src/main:
java/org/apache/commons/runtime/ native/include/acr/ native/shared/
Author: mturk
Date: Tue Apr 12 08:32:38 2011
New Revision: 1091323
URL: http://svn.apache.org/viewvc?rev=1091323&view=rev
Log:
Rename generic to MemoryPointer
Added:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/MemoryPointer.java
- copied, changed from r1091322, commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/GenericPointer.java
Removed:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/GenericPointer.java
Modified:
commons/sandbox/runtime/trunk/src/main/native/include/acr/pointer.h
commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c
commons/sandbox/runtime/trunk/src/main/native/shared/constptr.c
commons/sandbox/runtime/trunk/src/main/native/shared/pointer.c
Copied: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/MemoryPointer.java (from r1091322, commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/GenericPointer.java)
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/MemoryPointer.java?p2=commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/MemoryPointer.java&p1=commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/GenericPointer.java&r1=1091322&r2=1091323&rev=1091323&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/GenericPointer.java (original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/MemoryPointer.java Tue Apr 12 08:32:38 2011
@@ -21,13 +21,13 @@ package org.apache.commons.runtime;
*
* @since Runtime 1.0
*/
-final class GenericPointer extends Pointer
+final class MemoryPointer extends Pointer
{
private static native void free0(long p)
throws Throwable;
- private GenericPointer()
+ private MemoryPointer()
{
// No instance
}
@@ -35,7 +35,7 @@ final class GenericPointer extends Point
/*
* Only created from JNI code.
*/
- private GenericPointer(long ptr, long len)
+ private MemoryPointer(long ptr, long len)
{
POINTER = ptr;
PLENGTH = len;
Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr/pointer.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr/pointer.h?rev=1091323&r1=1091322&r2=1091323&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr/pointer.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr/pointer.h Tue Apr 12 08:32:38 2011
@@ -33,13 +33,13 @@ extern "C" {
ACR_CLASS_CTOR(ConstPointer);
ACR_CLASS_DTOR(ConstPointer);
-ACR_CLASS_CTOR(GenericPointer);
-ACR_CLASS_DTOR(GenericPointer);
+ACR_CLASS_CTOR(MemoryPointer);
+ACR_CLASS_DTOR(MemoryPointer);
jobject
AcrNewConstPointer(JNI_STDENV, void *ptr, size_t len);
jobject
-AcrNewGenericPointer(JNI_STDENV, void *ptr, size_t len);
+AcrNewMemoryPointer(JNI_STDENV, void *ptr, size_t len);
#ifdef __cplusplus
}
Modified: commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c?rev=1091323&r1=1091322&r2=1091323&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c Tue Apr 12 08:32:38 2011
@@ -24,6 +24,7 @@
#include "acr/callback.h"
#include "acr/observer.h"
#include "acr/iofd.h"
+#include "acr/pointer.h"
J_DECLARE_CLAZZ = {
INVALID_FIELD_BASE,
@@ -220,6 +221,8 @@ AcrLoadRuntimeClasses(JNI_STDENV)
{
ACR_CLASS_LOAD(Callback);
ACR_CLASS_LOPT(Unsafe);
+ ACR_CLASS_LOPT(ConstPointer);
+ ACR_CLASS_LOPT(MemoryPointer);
ACR_CLASS_LOPT(FileDescriptor);
#ifdef WIN32
@@ -232,6 +235,8 @@ void
AcrUnloadRuntimeClasses(JNI_STDENV)
{
+ ACR_CLASS_UNLOAD(ConstPointer);
+ ACR_CLASS_UNLOAD(MemoryPointer);
ACR_CLASS_UNLOAD(FileDescriptor);
ACR_CLASS_UNLOAD(Callback);
ACR_CLASS_UNLOAD(Unsafe);
Modified: commons/sandbox/runtime/trunk/src/main/native/shared/constptr.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/constptr.c?rev=1091323&r1=1091322&r2=1091323&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/constptr.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/constptr.c Tue Apr 12 08:32:38 2011
@@ -60,7 +60,7 @@ AcrNewConstPointer(JNI_STDENV, void *ptr
jobject po;
if (!CLAZZ_LOADED) {
- ACR_THROW_MSG(ACR_EX_EINSTANCE, "GenericPointer not initialized");
+ ACR_THROW_MSG(ACR_EX_EINSTANCE, "ConstPointer not initialized");
return 0;
}
po = (*env)->NewObject(env, _clazzn.i, J4MID(0000), P2J(ptr), (jlong)len);
Modified: commons/sandbox/runtime/trunk/src/main/native/shared/pointer.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/pointer.c?rev=1091323&r1=1091322&r2=1091323&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/pointer.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/pointer.c Tue Apr 12 08:32:38 2011
@@ -29,7 +29,7 @@ J_DECLARE_CLAZZ = {
0,
0,
0,
- ACR_CLASS_PATH "GenericPointer"
+ ACR_CLASS_PATH "MemoryPointer"
};
J_DECLARE_M_ID(0000) = {
@@ -54,7 +54,7 @@ J_DECLARE_F_ID(0001) = {
"J"
};
-ACR_CLASS_CTOR(GenericPointer)
+ACR_CLASS_CTOR(MemoryPointer)
{
int rv;
@@ -69,7 +69,7 @@ ACR_CLASS_CTOR(GenericPointer)
return 0;
}
-ACR_CLASS_DTOR(GenericPointer)
+ACR_CLASS_DTOR(MemoryPointer)
{
AcrUnloadClass(env, &_clazzn);
}
@@ -80,7 +80,7 @@ AcrNewGenericPointer(JNI_STDENV, void *p
jobject po;
if (!CLAZZ_LOADED) {
- ACR_THROW_MSG(ACR_EX_EINSTANCE, "GenericPointer not initialized");
+ ACR_THROW_MSG(ACR_EX_EINSTANCE, "MemoryPointer not initialized");
return 0;
}
po = (*env)->NewObject(env, _clazzn.i, J4MID(0000), P2J(ptr), (jlong)len);
@@ -89,7 +89,7 @@ AcrNewGenericPointer(JNI_STDENV, void *p
return po;
}
-ACR_JNI_EXPORT(void, Pointer, free0)(JNI_STDARGS, jlong ptr)
+ACR_JNI_EXPORT(void, MemoryPointer, free0)(JNI_STDARGS, jlong ptr)
{
AcrFree(J2P(ptr, void *));
}