commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r886913 - in /commons/sandbox/runtime/trunk/src/main/native: include/acr_private.h os/unix/finfo.c shared/constp.c shared/db.c shared/descriptor.c shared/mbstr.c shared/pointer.c
Date Thu, 03 Dec 2009 20:42:51 GMT
Author: mturk
Date: Thu Dec  3 20:42:50 2009
New Revision: 886913

URL: http://svn.apache.org/viewvc?rev=886913&view=rev
Log:
Revert changes. They simply don't work

Modified:
    commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h
    commons/sandbox/runtime/trunk/src/main/native/os/unix/finfo.c
    commons/sandbox/runtime/trunk/src/main/native/shared/constp.c
    commons/sandbox/runtime/trunk/src/main/native/shared/db.c
    commons/sandbox/runtime/trunk/src/main/native/shared/descriptor.c
    commons/sandbox/runtime/trunk/src/main/native/shared/mbstr.c
    commons/sandbox/runtime/trunk/src/main/native/shared/pointer.c

Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h?rev=886913&r1=886912&r2=886913&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h Thu Dec  3 20:42:50
2009
@@ -320,14 +320,6 @@
 #define J_DECLARE_F_ID(I) static JAVA_F_ID _f##I##n
 #define J_DECLARE_M_ID(I) static JAVA_M_ID _m##I##n
 
-#define J_DECLARE_CLASS(N, P)    static JAVA_C_ID _clazzn  = { NULL, NULL, #P #N }
-
-#define J_DECLARE_FIELD(N, S)    static JAVA_F_ID _f##N##n = { NULL, #N, #S }
-#define J_DECLARE_M_SET(N, S)    static JAVA_M_ID _m##N##n = { NULL, "set" #N, "(" #S ")V"
}
-#define J_DECLARE_M_GET(N, S)    static JAVA_M_ID _m##N##n = { NULL, "get" #N, "()" #S  
  }
-#define J_DECLARE_M_INI(N, S)    static JAVA_M_ID _m##N##n = { NULL, "<init>", "("
#S ")V" }
-#define J_DECLARE_MCALL(N, P, R) static JAVA_M_ID _m##N##n = { NULL, #N, "(" #P ")" #R  }
-
 #define J4MID(I)          _m##I##n.i
 
 #define J_LOAD_METHOD(I)    \

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/finfo.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/finfo.c?rev=886913&r1=886912&r2=886913&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/finfo.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/finfo.c Thu Dec  3 20:42:50 2009
@@ -33,29 +33,107 @@
 extern mode_t acr_default_umask;
 extern mode_t acr_default_perms;
 
-/**
- * org.apache.common.runtime.io.FileInfo
- */
-J_DECLARE_CLASS(FileInfo, ACR_IO_CLASS_PATH);
-
-J_DECLARE_FIELD(Protection,     I);
-J_DECLARE_FIELD(User,           "L" ACR_CLASS_PATH "User;");
-J_DECLARE_FIELD(Group,          "L" ACR_CLASS_PATH "Group;");
-J_DECLARE_FIELD(NumLinks,       I);
-J_DECLARE_FIELD(Size,           J);
-J_DECLARE_FIELD(StorageSize,    J);
-J_DECLARE_FIELD(LastAccessTime, J);
-
-J_DECLARE_FIELD(ModifiedTime,   J);
-J_DECLARE_FIELD(CreatedTime,    J);
-J_DECLARE_FIELD(Path,           "Ljava/lang/String;");
-J_DECLARE_FIELD(Name,           "Ljava/lang/String;");
-J_DECLARE_FIELD(InodeId,        J);
-J_DECLARE_FIELD(DeviceId,       J);
-
-J_DECLARE_M_INI(0000,           I);
-J_DECLARE_M_INI(0001,           "Ljava/lang/String;");
-J_DECLARE_M_SET(Type,           I);
+J_DECLARE_CLAZZ = {
+    NULL,
+    NULL,
+    ACR_IO_CLASS_PATH "FileInfo"
+};
+
+J_DECLARE_F_ID(0000) = {
+    NULL,
+    "Protection",
+    "I"
+};
+
+J_DECLARE_F_ID(0001) = {
+    NULL,
+    "User",
+    "L" ACR_CLASS_PATH "User;"
+};
+
+J_DECLARE_F_ID(0002) = {
+    NULL,
+    "Group",
+    "L" ACR_CLASS_PATH "Group;"
+};
+
+J_DECLARE_F_ID(0003) = {
+    NULL,
+    "NumLinks",
+    "I"
+};
+
+J_DECLARE_F_ID(0004) = {
+    NULL,
+    "Size",
+    "J"
+};
+
+J_DECLARE_F_ID(0005) = {
+    NULL,
+    "StorageSize",
+    "J"
+};
+
+J_DECLARE_F_ID(0006) = {
+    NULL,
+    "LastAccessTime",
+    "J"
+};
+
+J_DECLARE_F_ID(0007) = {
+    NULL,
+    "ModifiedTime",
+    "J"
+};
+
+J_DECLARE_F_ID(0008) = {
+    NULL,
+    "CreatedTime",
+    "J"
+};
+
+J_DECLARE_F_ID(0009) = {
+    NULL,
+    "Path",
+    "Ljava/lang/String;"
+};
+
+J_DECLARE_F_ID(0010) = {
+    NULL,
+    "Name",
+    "Ljava/lang/String;"
+};
+
+J_DECLARE_F_ID(0011) = {
+    NULL,
+    "InodeId",
+    "J"
+};
+
+J_DECLARE_F_ID(0012) = {
+    NULL,
+    "DeviceId",
+    "J"
+};
+
+J_DECLARE_M_ID(0000) = {
+    NULL,
+    "<init>",
+    "(I)V"
+};
+
+J_DECLARE_M_ID(0001) = {
+    NULL,
+    "<init>",
+    "(Ljava/lang/String;)V"
+};
+
+J_DECLARE_M_ID(0002) = {
+    NULL,
+    "setType",
+    "(I)V"
+};
 
 ACR_CLASS_LDEF(io_FileInfo)
 {
@@ -63,23 +141,22 @@
 
     if ((rv = ACR_LoadClass(_E, &_clazzn, 0)) != ACR_SUCCESS)
         return rv;
-    J_LOAD_IFIELD(Protection);
-    J_LOAD_IFIELD(User);
-    J_LOAD_IFIELD(Group);
-    J_LOAD_IFIELD(NumLinks);
-    J_LOAD_IFIELD(Size);
-    J_LOAD_IFIELD(StorageSize);
-    J_LOAD_IFIELD(LastAccessTime);
-    J_LOAD_IFIELD(ModifiedTime);
-    J_LOAD_IFIELD(CreatedTime);
-    J_LOAD_IFIELD(Path);
-    J_LOAD_IFIELD(Name);
-    J_LOAD_IFIELD(InodeId);
-    J_LOAD_IFIELD(DeviceId);
-
+    J_LOAD_IFIELD(0000);
+    J_LOAD_IFIELD(0001);
+    J_LOAD_IFIELD(0002);
+    J_LOAD_IFIELD(0003);
+    J_LOAD_IFIELD(0004);
+    J_LOAD_IFIELD(0005);
+    J_LOAD_IFIELD(0006);
+    J_LOAD_IFIELD(0007);
+    J_LOAD_IFIELD(0008);
+    J_LOAD_IFIELD(0009);
+    J_LOAD_IFIELD(0010);
+    J_LOAD_IFIELD(0011);
+    J_LOAD_IFIELD(0012);
     J_LOAD_METHOD(0000);
     J_LOAD_METHOD(0001);
-    J_LOAD_METHOD(Type);
+    J_LOAD_METHOD(0002);
 
     return ACR_SUCCESS;
 }
@@ -109,25 +186,25 @@
 
 static void _fill0(ACR_JNISTDARGS, struct_stat_t *info, jboolean full)
 {
-    SET_IFIELD_I(Protection, _O, ACR_UnixModeToPerms(info->st_mode));
+    SET_IFIELD_I(0000, _O, ACR_UnixModeToPerms(info->st_mode));
     if (full) {
-        SET_IFIELD_O(User,  _O, ACR_UserObjectCreateFromId(_E,  info->st_uid));
-        SET_IFIELD_O(Group, _O, ACR_GroupObjectCreateFromId(_E, info->st_gid));
+        SET_IFIELD_O(0001, _O, ACR_UserObjectCreateFromId(_E,  info->st_uid));
+        SET_IFIELD_O(0002, _O, ACR_GroupObjectCreateFromId(_E, info->st_gid));
     }
-    SET_IFIELD_I(NumLinks,  _O, info->st_nlink);
-    SET_IFIELD_J(Size,      _O, info->st_size);
+    SET_IFIELD_I(0003, _O, info->st_nlink);
+    SET_IFIELD_J(0004, _O, info->st_size);
     /* TODO: Some platforms lack the st_blocks member
      */
 #ifdef DEV_BSIZE
-    SET_IFIELD_J(StorageSize, _O, (info->st_blocks * (jlong)DEV_BSIZE));
+    SET_IFIELD_J(0005, _O, (info->st_blocks * (jlong)DEV_BSIZE));
 #else
-    SET_IFIELD_J(StorageSize, _O, (info->st_blocks * (jlong)512));
+    SET_IFIELD_J(0005, _O, (info->st_blocks * (jlong)512));
 #endif
-    SET_IFIELD_J(LastAccessTime, _O, info->st_atime);
-    SET_IFIELD_J(ModifiedTime,   _O, info->st_mtime);
-    SET_IFIELD_J(CreatedTime,    _O, info->st_ctime);
-    SET_IFIELD_J(InodeId,        _O, info->st_ino);
-    SET_IFIELD_J(DeviceId,       _O, info->st_dev);
+    SET_IFIELD_J(0006, _O, info->st_atime);
+    SET_IFIELD_J(0007, _O, info->st_mtime);
+    SET_IFIELD_J(0008, _O, info->st_ctime);
+    SET_IFIELD_J(0011, _O, info->st_ino);
+    SET_IFIELD_J(0012, _O, info->st_dev);
 }
 
 static int _ftype0(struct_stat_t *info)
@@ -203,9 +280,9 @@
             char *name;
 
             name = dirname_r(canon, path, PATH_MAX);
-            SET_IFIELD_S(Path, fi, name);
+            SET_IFIELD_S(0009, fi, name);
             name = basename_r(canon, path, PATH_MAX);
-            SET_IFIELD_S(Name, fi, name);
+            SET_IFIELD_S(0010, fi, name);
         }
         x_free(canon);
     }
@@ -245,9 +322,9 @@
         char *name;
 
         name = dirname_r(f->name, path, PATH_MAX);
-        SET_IFIELD_S(Path, fi, name);
+        SET_IFIELD_S(0009, fi, name);
         name = basename_r(f->name, path, PATH_MAX);
-        SET_IFIELD_S(Name, fi, name);
+        SET_IFIELD_S(0010, fi, name);
     }
     _fill0(_E, fi, &info, full);
 
@@ -264,7 +341,7 @@
     if (rc < 0)
         return ACR_GET_OS_ERROR();
     type = _ftype0(&info);
-    CALL_VMETHOD1(Type, _O, type);
+    CALL_VMETHOD1(0002, _O, type);
     _fill0(_E, _O, &info, JNI_TRUE);
 
     return 0;

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/constp.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/constp.c?rev=886913&r1=886912&r2=886913&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/constp.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/constp.c Thu Dec  3 20:42:50 2009
@@ -37,14 +37,34 @@
 #define ACR_CPT_EXPORT_DECLARE(RT, FN)  \
     JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_ConstPointer64_##FN
 
-J_DECLARE_CLASS(ConstPointer64, ACR_CLASS_PATH);
-J_DECLARE_M_INI(ctor0,          JJJ);
+J_DECLARE_CLAZZ = {
+    NULL,
+    NULL,
+    ACR_CLASS_PATH "ConstPointer64"
+};
+
+J_DECLARE_M_ID(0000) = {
+    NULL,
+    "<init>",
+    "(JJJ)V"
+};
+
 #else
 #define ACR_DBB_EXPORT_DECLARE(RT, FN)  \
     JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_ConstPointer32_##FN
 
-J_DECLARE_CLASS(ConstPointer32, ACR_CLASS_PATH);
-J_DECLARE_M_INI(ctor0,          III);
+J_DECLARE_CLAZZ = {
+    NULL,
+    NULL,
+    ACR_CLASS_PATH "ConstPointer32"
+};
+
+J_DECLARE_M_ID(0000) = {
+    NULL,
+    "<init>",
+    "(III)V"
+};
+
 #endif
 
 ACR_CLASS_LDEF(ConstPointer)
@@ -53,7 +73,7 @@
 
     if ((rv = ACR_LoadClass(_E, &_clazzn, 0)) != ACR_SUCCESS)
         return rv;
-    J_LOAD_METHOD(ctor0);
+    J_LOAD_METHOD(0000);
 
     return ACR_SUCCESS;
 }
@@ -74,8 +94,8 @@
 ACR_DECLARE(jobject) ACR_NewConstPointer(JNIEnv *_E, const void *p, size_t len,
                                          acr_pointer_cleanup_fn_t *cb)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
-         return (*_E)->NewObject(_E, _clazzn.i, J4MID(ctor0),
+    if (_clazzn.i && J4MID(0000)) {
+         return (*_E)->NewObject(_E, _clazzn.i, J4MID(0000),
                                  P2N(p), P2N(cb), (acr_ptr_t)len);
     }
     else {

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/db.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/db.c?rev=886913&r1=886912&r2=886913&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/db.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/db.c Thu Dec  3 20:42:50 2009
@@ -38,14 +38,34 @@
 #define ACR_DBB_EXPORT_DECLARE(RT, FN)  \
     JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_DirectBuffer64_##FN
 
-J_DECLARE_CLASS(DirectBuffer64, ACR_CLASS_PATH);
-J_DECLARE_M_INI(ctor0,          JJJ);
+J_DECLARE_CLAZZ = {
+    NULL,
+    NULL,
+    ACR_CLASS_PATH "DirectBuffer64"
+};
+
+J_DECLARE_M_ID(0000) = {
+    NULL,
+    "<init>",
+    "(JJJ)V"
+};
+
 #else
 #define ACR_DBB_EXPORT_DECLARE(RT, FN)  \
     JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_DirectBuffer32_##FN
 
-J_DECLARE_CLASS(DirectBuffer32, ACR_CLASS_PATH);
-J_DECLARE_M_INI(ctor0,          III);
+J_DECLARE_CLAZZ = {
+    NULL,
+    NULL,
+    ACR_CLASS_PATH "DirectBuffer32"
+};
+
+J_DECLARE_M_ID(0000) = {
+    NULL,
+    "<init>",
+    "(III)V"
+};
+
 #endif
 
 ACR_CLASS_LDEF(DirectBuffer)
@@ -54,7 +74,7 @@
 
     if ((rv = ACR_LoadClass(_E, &_clazzn, 0)) != ACR_SUCCESS)
         return rv;
-    J_LOAD_METHOD(ctor0);
+    J_LOAD_METHOD(0000);
 
     return ACR_SUCCESS;
 }
@@ -88,7 +108,7 @@
 
 ACR_DECLARE(jobject) ACR_NewDirectBuffer(JNIEnv *_E, size_t len)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
+    if (_clazzn.i && J4MID(0000)) {
         jobject ptr = NULL;
         void   *mem;
         acr_size_t siz = (acr_size_t)ACR_ALIGN_DEFAULT(len);
@@ -101,7 +121,7 @@
         if (mem) {
             /* Create the DirectBuffer class with default cleanup.
              */
-            ptr = (*_E)->NewObject(_E, _clazzn.i, J4MID(ctor0),
+            ptr = (*_E)->NewObject(_E, _clazzn.i, J4MID(0000),
                                    P2N(mem), P2N(direct_buffer_cleanup),
                                    (acr_ptr_t)len);
             if (!ptr)
@@ -118,8 +138,8 @@
 ACR_DECLARE(jobject) ACR_NewDirectBufferEx(JNIEnv *_E, void *p, size_t len,
                                            acr_pointer_cleanup_fn_t *cb)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
-        return (*_E)->NewObject(_E, _clazzn.i, J4MID(ctor0),
+    if (_clazzn.i && J4MID(0000)) {
+        return (*_E)->NewObject(_E, _clazzn.i, J4MID(0000),
                                 P2N(p), P2N(cb), (acr_ptr_t)len);
     }
     else {

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/descriptor.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/descriptor.c?rev=886913&r1=886912&r2=886913&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/descriptor.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/descriptor.c Thu Dec  3 20:42:50
2009
@@ -31,20 +31,77 @@
  * Descriptor class utilities
  */
 #if CC_SIZEOF_VOIDP == 8
-J_DECLARE_CLASS(Descriptor64, ACR_CLASS_PATH);
-J_DECLARE_M_INI(ctor0,        IIJJ);
+
+J_DECLARE_CLAZZ = {
+    NULL,
+    NULL,
+    ACR_CLASS_PATH "Descriptor64"
+};
+
+J_DECLARE_M_ID(0000) = {
+    NULL,
+    "<init>",
+    "(IIJJ)V"
+};
+
 #else
-J_DECLARE_CLASS(Descriptor32, ACR_CLASS_PATH);
-J_DECLARE_M_INI(ctor0,        IIII);
+
+J_DECLARE_CLAZZ = {
+    NULL,
+    NULL,
+    ACR_CLASS_PATH "Descriptor32"
+};
+
+
+J_DECLARE_M_ID(0000) = {
+    NULL,
+    "<init>",
+    "(IIII)V"
+};
+
 #endif
 
-J_DECLARE_FIELD(ISVALID,     I);
-J_DECLARE_FIELD(IHANDLE,     I);
-J_DECLARE_FIELD(PHANDLE,     IFIELD_PTR);
-J_DECLARE_FIELD(HANDLER,     IFIELD_PTR);
-J_DECLARE_FIELD(IERRNUM,     I);
-J_DECLARE_FIELD(IDFLAGS,     I);
-J_DECLARE_FIELD(CONTEXT,     "Ljava/lang/Object;");
+J_DECLARE_F_ID(0000) = {
+    NULL,
+    "ISVALID",
+    "I"
+};
+
+J_DECLARE_F_ID(0001) = {
+    NULL,
+    "IHANDLE",
+    "I"
+};
+
+J_DECLARE_F_ID(0002) = {
+    NULL,
+    "PHANDLE",
+    IFIELD_PTR
+};
+
+J_DECLARE_F_ID(0003) = {
+    NULL,
+    "HANDLER",
+    IFIELD_PTR
+};
+
+J_DECLARE_F_ID(0004) = {
+    NULL,
+    "IERRNUM",
+    "I"
+};
+
+J_DECLARE_F_ID(0005) = {
+    NULL,
+    "IDFLAGS",
+    "I"
+};
+
+J_DECLARE_F_ID(0006) = {
+    NULL,
+    "CONTEXT",
+    "Ljava/lang/Object;"
+};
 
 ACR_CLASS_LDEF(Descriptor)
 {
@@ -52,14 +109,14 @@
 
     if ((rv = ACR_LoadClass(_E, &_clazzn, 0)) != ACR_SUCCESS)
         return rv;
-    J_LOAD_IFIELD(ISVALID);
-    J_LOAD_IFIELD(IHANDLE);
-    J_LOAD_IFIELD(PHANDLE);
-    J_LOAD_IFIELD(HANDLER);
-    J_LOAD_IFIELD(IERRNUM);
-    J_LOAD_IFIELD(IDFLAGS);
-    J_LOAD_IFIELD(CONTEXT);
-    J_LOAD_METHOD(ctor0);
+    J_LOAD_IFIELD(0000);
+    J_LOAD_IFIELD(0001);
+    J_LOAD_IFIELD(0002);
+    J_LOAD_IFIELD(0003);
+    J_LOAD_IFIELD(0004);
+    J_LOAD_IFIELD(0005);
+    J_LOAD_IFIELD(0006);
+    J_LOAD_METHOD(0000);
 
     return ACR_SUCCESS;
 }
@@ -91,30 +148,30 @@
         initd0(_E);
     }
     nd = ACR_DescriptorCreate(_E, 0, -1, NULL, NULL);
-    if (nd && _clazzn.i && J4MID(ctor0)) {
-        SET_IFIELD_I(IERRNUM, nd, ACR_EBADF);
+    if (nd && _clazzn.i && J4MID(0000)) {
+        SET_IFIELD_I(0004, nd, ACR_EBADF);
     }
     return nd;
 }
 
 ACR_JNI_EXPORT_DECLARE(void, Descriptor, close0)(ACR_JNISTDARGS)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
+    if (_clazzn.i && J4MID(0000)) {
         acr_descriptor_cb_t cb;
         acr_descriptor_handler_fn_t *handler;
 
-        cb.di   = GET_IFIELD_I(IHANDLE, _O);
-        cb.dp   = GET_IFIELD_V(PHANDLE, _O, void *);
-        handler = GET_IFIELD_V(HANDLER, _O, acr_descriptor_handler_fn_t *);
+        cb.di   = GET_IFIELD_I(0001, _O);
+        cb.dp   = GET_IFIELD_V(0002, _O, void *);
+        handler = GET_IFIELD_V(0003, _O, acr_descriptor_handler_fn_t *);
 
-        SET_IFIELD_I(ISVALID, _O, 0);
+        SET_IFIELD_I(0000, _O, 0);
         if (cb.dp) {
-            SET_IFIELD_P(PHANDLE, _O, NULL);
+            SET_IFIELD_P(0002, _O, NULL);
         }
         if (handler) {
             int rc;
             cb.thiz = _O;
-            cb.data = GET_IFIELD_O(CONTEXT, _O);
+            cb.data = GET_IFIELD_O(0006, _O);
             if ((rc = (*handler)(_E, _O, ACR_DESC_CLOSE, &cb))) {
                 /* Throw IOException with errno message */
                 ACR_THROW_IO_IF_ERR(rc);
@@ -127,23 +184,23 @@
 
 ACR_JNI_EXPORT_DECLARE(void, Descriptor, close1)(ACR_JNISTDARGS)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
+    if (_clazzn.i && J4MID(0000)) {
         acr_descriptor_cb_t cb;
         acr_descriptor_handler_fn_t *handler;
 
-        cb.di   = GET_IFIELD_I(IHANDLE, _O);
-        cb.dp   = GET_IFIELD_V(PHANDLE, _O, void *);
-        handler = GET_IFIELD_V(HANDLER, _O, acr_descriptor_handler_fn_t *);
+        cb.di   = GET_IFIELD_I(0001, _O);
+        cb.dp   = GET_IFIELD_V(0002, _O, void *);
+        handler = GET_IFIELD_V(0003, _O, acr_descriptor_handler_fn_t *);
 
         if (cb.di >= 0) {
-            SET_IFIELD_I(IHANDLE, _O, -1);
+            SET_IFIELD_I(0001, _O, -1);
         }
         if (cb.dp) {
-            SET_IFIELD_P(PHANDLE, _O, NULL);
+            SET_IFIELD_P(0002, _O, NULL);
         }
         if (handler) {
             cb.thiz = _O;
-            cb.data = GET_IFIELD_O(CONTEXT, _O);
+            cb.data = GET_IFIELD_O(0006, _O);
             (*handler)(_E, _O, ACR_DESC_FINALIZE, &cb);
         }
     }
@@ -151,18 +208,18 @@
 
 ACR_JNI_EXPORT_DECLARE(void, Descriptor, sync0)(ACR_JNISTDARGS)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
+    if (_clazzn.i && J4MID(0000)) {
         acr_descriptor_cb_t cb;
         acr_descriptor_handler_fn_t *handler;
 
-        cb.di   = GET_IFIELD_I(IHANDLE, _O);
-        cb.dp   = GET_IFIELD_V(PHANDLE, _O, void *);
-        handler = GET_IFIELD_V(HANDLER, _O, acr_descriptor_handler_fn_t *);
+        cb.di   = GET_IFIELD_I(0001, _O);
+        cb.dp   = GET_IFIELD_V(0002, _O, void *);
+        handler = GET_IFIELD_V(0003, _O, acr_descriptor_handler_fn_t *);
 
         if (handler) {
             int rc;
             cb.thiz = _O;
-            cb.data = GET_IFIELD_O(CONTEXT, _O);
+            cb.data = GET_IFIELD_O(0006, _O);
             if ((rc = (*handler)(_E, _O, ACR_DESC_SYNC, &cb))) {
                 if (rc == ACR_ENOTIMPL) {
                     ACR_THROW_EX_IF_ERR(ACR_EX_ESYNC, rc);
@@ -180,18 +237,18 @@
 
 ACR_JNI_EXPORT_DECLARE(void, Descriptor, flush0)(ACR_JNISTDARGS)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
+    if (_clazzn.i && J4MID(0000)) {
         acr_descriptor_cb_t cb;
         acr_descriptor_handler_fn_t *handler;
 
-        cb.di   = GET_IFIELD_I(IHANDLE, _O);
-        cb.dp   = GET_IFIELD_V(PHANDLE, _O, void *);
-        handler = GET_IFIELD_V(HANDLER, _O, acr_descriptor_handler_fn_t *);
+        cb.di   = GET_IFIELD_I(0001, _O);
+        cb.dp   = GET_IFIELD_V(0002, _O, void *);
+        handler = GET_IFIELD_V(0003, _O, acr_descriptor_handler_fn_t *);
 
         if (handler) {
             int rc;
             cb.thiz = _O;
-            cb.data = GET_IFIELD_O(CONTEXT, _O);
+            cb.data = GET_IFIELD_O(0006, _O);
             if ((rc = (*handler)(_E, _O, ACR_DESC_FLUSH, &cb))) {
                 if (rc == ACR_ENOTIMPL) {
                     ACR_THROW_EX_IF_ERR(ACR_EX_ESYNC, rc);
@@ -210,8 +267,8 @@
 ACR_DECLARE(jobject) ACR_DescriptorCreate(JNIEnv *_E, int f, int i, void *p,
                                           acr_descriptor_handler_fn_t *cb)
 {
-    if (_clazzn.i && J4MID(ctor0))
-        return (*_E)->NewObject(_E, _clazzn.i, J4MID(ctor0),
+    if (_clazzn.i && J4MID(0000))
+        return (*_E)->NewObject(_E, _clazzn.i, J4MID(0000),
                                 (jint)f, (jint)i, P2N(p), P2N(cb));
     else {
         ACR_SET_OS_ERROR(ACR_ECLASSNOTFOUND);
@@ -223,18 +280,18 @@
                                       int f, int i, void *p,
                                       acr_descriptor_handler_fn_t *c)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
+    if (_clazzn.i && J4MID(0000)) {
         if ((*_E)->MonitorEnter(_E, dp)) {
             /* Object locking failed */
             return ACR_ENOLOCK;
         }
-        SET_IFIELD_I(ISVALID, dp, 1);
-        SET_IFIELD_I(IHANDLE, dp, i);
-        SET_IFIELD_P(PHANDLE, dp, p);
-        SET_IFIELD_P(HANDLER, dp, c);
-        SET_IFIELD_I(IERRNUM, dp, 0);
-        SET_IFIELD_I(IDFLAGS, dp, f);
-        SET_IFIELD_O(CONTEXT, dp, NULL);
+        SET_IFIELD_I(0000, dp, 1);
+        SET_IFIELD_I(0001, dp, i);
+        SET_IFIELD_P(0002, dp, p);
+        SET_IFIELD_P(0003, dp, c);
+        SET_IFIELD_I(0004, dp, 0);
+        SET_IFIELD_I(0005, dp, f);
+        SET_IFIELD_O(0006, dp, NULL);
 
         (*_E)->MonitorExit(_E, dp);
         return ACR_SUCCESS;
@@ -246,7 +303,7 @@
 
 ACR_DECLARE(int) ACR_DescriptorCleanup(ACR_JNISTDARGS)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
+    if (_clazzn.i && J4MID(0000)) {
         acr_descriptor_cb_t cb;
         acr_descriptor_handler_fn_t *handler;
 
@@ -254,23 +311,23 @@
             /* Object locking failed */
             return ACR_ENOLOCK;
         }
-        cb.di   = GET_IFIELD_I(IHANDLE, _O);
-        cb.dp   = GET_IFIELD_V(PHANDLE, _O, void *);
-        handler = GET_IFIELD_V(HANDLER, _O, acr_descriptor_handler_fn_t *);
+        cb.di   = GET_IFIELD_I(0001, _O);
+        cb.dp   = GET_IFIELD_V(0002, _O, void *);
+        handler = GET_IFIELD_V(0003, _O, acr_descriptor_handler_fn_t *);
         if (cb.di >= 0) {
-            SET_IFIELD_I(IHANDLE, _O, -1);
+            SET_IFIELD_I(0001, _O, -1);
         }
         if (cb.dp) {
-            SET_IFIELD_P(PHANDLE, _O, NULL);
+            SET_IFIELD_P(0002, _O, NULL);
         }
         if (handler) {
-            SET_IFIELD_P(HANDLER, _O, NULL);
+            SET_IFIELD_P(0003, _O, NULL);
         }
         (*_E)->MonitorExit(_E, _O);
 
         if (handler) {
             cb.thiz = _O;
-            cb.data = GET_IFIELD_O(CONTEXT, _O);
+            cb.data = GET_IFIELD_O(0006, _O);
             return (*handler)(_E, _O, ACR_DESC_FINALIZE, &cb);
         }
         else {
@@ -284,18 +341,18 @@
 
 ACR_DECLARE(int) ACR_DescriptorClear(ACR_JNISTDARGS)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
+    if (_clazzn.i && J4MID(0000)) {
         if ((*_E)->MonitorEnter(_E, _O)) {
             /* Object locking failed */
             return ACR_ENOLOCK;
         }
-        SET_IFIELD_I(ISVALID, _O, 0);
-        SET_IFIELD_I(IHANDLE, _O, -1);
-        SET_IFIELD_P(PHANDLE, _O, NULL);
-        SET_IFIELD_P(HANDLER, _O, NULL);
-        SET_IFIELD_I(IERRNUM, _O, 0);
-        SET_IFIELD_I(IDFLAGS, _O, 0);
-        SET_IFIELD_O(CONTEXT, _O, NULL);
+        SET_IFIELD_I(0000, _O, 0);
+        SET_IFIELD_I(0001, _O, -1);
+        SET_IFIELD_P(0002, _O, NULL);
+        SET_IFIELD_P(0003, _O, NULL);
+        SET_IFIELD_I(0004, _O, 0);
+        SET_IFIELD_I(0005, _O, 0);
+        SET_IFIELD_O(0006, _O, NULL);
 
         (*_E)->MonitorExit(_E, _O);
         return ACR_SUCCESS;
@@ -306,8 +363,8 @@
 
 ACR_DECLARE(void *) ACR_DescriptorGetPtr(ACR_JNISTDARGS)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
-        return GET_IFIELD_V(PHANDLE, _O, void *);
+    if (_clazzn.i && J4MID(0000)) {
+        return GET_IFIELD_V(0002, _O, void *);
     }
     else {
         ACR_SET_OS_ERROR(ACR_ECLASSNOTFOUND);
@@ -317,8 +374,8 @@
 
 ACR_DECLARE(int) ACR_DescriptorGetInt(ACR_JNISTDARGS)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
-        return GET_DFIELD_I(IHANDLE, _O, -1);
+    if (_clazzn.i && J4MID(0000)) {
+        return GET_DFIELD_I(0001, _O, -1);
     }
     else {
         ACR_SET_OS_ERROR(ACR_ECLASSNOTFOUND);
@@ -328,8 +385,8 @@
 
 ACR_DECLARE(int) ACR_DescriptorGetErr(ACR_JNISTDARGS)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
-        return GET_IFIELD_I(IERRNUM, _O);
+    if (_clazzn.i && J4MID(0000)) {
+        return GET_IFIELD_I(0004, _O);
     }
     else {
         ACR_SET_OS_ERROR(ACR_ECLASSNOTFOUND);
@@ -339,8 +396,8 @@
 
 ACR_DECLARE(int) ACR_DescriptorFlags(ACR_JNISTDARGS)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
-        return GET_IFIELD_I(IDFLAGS, _O);
+    if (_clazzn.i && J4MID(0000)) {
+        return GET_IFIELD_I(0005, _O);
     }
     else {
         ACR_SET_OS_ERROR(ACR_ECLASSNOTFOUND);
@@ -350,12 +407,12 @@
 
 ACR_DECLARE(int) ACR_DescriptorSetPtr(ACR_JNISTDARGS, void *p)
 {
-    if (_clazzn.i && J4MID(ctor0) && _O) {
+    if (_clazzn.i && J4MID(0000) && _O) {
         if ((*_E)->MonitorEnter(_E, _O)) {
             /* Object locking failed */
             return ACR_ENOLOCK;
         }
-        SET_IFIELD_P(PHANDLE, _O, p);
+        SET_IFIELD_P(0002, _O, p);
         (*_E)->MonitorExit(_E, _O);
         return ACR_SUCCESS;
     }
@@ -366,12 +423,12 @@
 
 ACR_DECLARE(int) ACR_DescriptorSetInt(ACR_JNISTDARGS, int i)
 {
-    if (_clazzn.i && J4MID(ctor0) && _O) {
+    if (_clazzn.i && J4MID(0000) && _O) {
         if ((*_E)->MonitorEnter(_E, _O)) {
             /* Object locking failed */
             return ACR_ENOLOCK;
         }
-        SET_IFIELD_I(IHANDLE, _O, i);
+        SET_IFIELD_I(0001, _O, i);
         (*_E)->MonitorExit(_E, _O);
         return ACR_SUCCESS;
     }
@@ -382,8 +439,8 @@
 
 ACR_DECLARE(int) ACR_DescriptorSetErr(ACR_JNISTDARGS, int e)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
-        SET_IFIELD_I(IERRNUM, _O, e);
+    if (_clazzn.i && J4MID(0000)) {
+        SET_IFIELD_I(0004, _O, e);
         return ACR_SUCCESS;
     }
     else {
@@ -393,8 +450,8 @@
 
 ACR_DECLARE(int) ACR_DescriptorSetCtx(ACR_JNISTDARGS, jobject ctx)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
-        SET_IFIELD_O(CONTEXT, _O, ctx);
+    if (_clazzn.i && J4MID(0000)) {
+        SET_IFIELD_O(0006, _O, ctx);
         return ACR_SUCCESS;
     }
     else {
@@ -404,8 +461,8 @@
 
 ACR_DECLARE(jobject) ACR_DescriptorGetCtx(ACR_JNISTDARGS)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
-        return GET_IFIELD_O(CONTEXT, _O);
+    if (_clazzn.i && J4MID(0000)) {
+        return GET_IFIELD_O(0006, _O);
     }
     else {
         ACR_SET_OS_ERROR(ACR_ECLASSNOTFOUND);
@@ -418,7 +475,7 @@
     if (_clazzn.i && _O) {
         _O = (*_E)->NewLocalRef(_E, _O);
         if (_O) {
-            SET_IFIELD_I(IERRNUM, _O, e);
+            SET_IFIELD_I(0004, _O, e);
             (*_E)->DeleteLocalRef(_E, _O);
         }
         return ACR_SUCCESS;

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/mbstr.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/mbstr.c?rev=886913&r1=886912&r2=886913&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/mbstr.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/mbstr.c Thu Dec  3 20:42:50 2009
@@ -24,9 +24,23 @@
 #include "acr_clazz.h"
 #include "acr_vm.h"
 
-J_DECLARE_CLASS(MbString,   ACR_CLASS_PATH);
-J_DECLARE_M_INI(ctor0,      "[B");
-J_DECLARE_FIELD(mbstr,      "[B");
+J_DECLARE_CLAZZ = {
+    NULL,
+    NULL,
+    ACR_CLASS_PATH "MbString"
+};
+
+J_DECLARE_M_ID(0000) = {
+    NULL,
+    "<init>",
+    "([B)V"
+};
+
+J_DECLARE_F_ID(0000) = {
+    NULL,
+    "mbstr",
+    "[B"
+};
 
 ACR_CLASS_LDEF(MbString)
 {
@@ -34,8 +48,8 @@
 
     if ((rv = ACR_LoadClass(_E, &_clazzn, 0)) != ACR_SUCCESS)
         return rv;
-    J_LOAD_METHOD(ctor0);
-    J_LOAD_IFIELD(mbstr);
+    J_LOAD_METHOD(0000);
+    J_LOAD_IFIELD(0000);
 
     return ACR_SUCCESS;
 }
@@ -47,13 +61,13 @@
 
 ACR_DECLARE(jobject) ACR_NewMbString(JNIEnv *_E, const char *str)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
+    if (_clazzn.i && J4MID(0000)) {
         jbyteArray ba;
         size_t sl = strlen(str) + 1;
 
         if ((ba = (*_E)->NewByteArray(_E, (jsize)sl))) {
             (*_E)->SetByteArrayRegion(_E, ba, 0, (jsize)sl, (jbyte *)str);
-            return (*_E)->NewObject(_E, _clazzn.i, J4MID(ctor0), ba);
+            return (*_E)->NewObject(_E, _clazzn.i, J4MID(0000), ba);
         }
         else {
             ACR_SET_OS_ERROR(ACR_ENOMEM);
@@ -68,8 +82,8 @@
 
 ACR_DECLARE(jbyteArray) ACR_GetMbString(ACR_JNISTDARGS, char **str)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
-        jbyteArray ba = GET_IFIELD_O(mbstr, _O);
+    if (_clazzn.i && J4MID(0000)) {
+        jbyteArray ba = GET_IFIELD_O(0000, _O);
         if (ba) {
             *str = (char *)(*_E)->GetByteArrayElements(_E, ba, NULL);
             return ba;

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=886913&r1=886912&r2=886913&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/pointer.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/pointer.c Thu Dec  3 20:42:50 2009
@@ -32,20 +32,54 @@
 #define ACR_PTR_EXPORT_DECLARE(RT, FN)  \
     JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_Pointer64_##FN
 
-J_DECLARE_CLASS(Pointer64,  ACR_CLASS_PATH);
-J_DECLARE_M_INI(ctor0,      JJJ);
+J_DECLARE_CLAZZ = {
+    NULL,
+    NULL,
+    ACR_CLASS_PATH "Pointer64"
+};
+
+J_DECLARE_M_ID(0000) = {
+    NULL,
+    "<init>",
+    "(JJJ)V"
+};
+
 #else
 #define ACR_PTR_EXPORT_DECLARE(RT, FN)  \
     JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_Pointer32_##FN
 
-J_DECLARE_CLASS(Pointer32,  ACR_CLASS_PATH);
-J_DECLARE_M_INI(ctor0,      III);
+J_DECLARE_CLAZZ = {
+    NULL,
+    NULL,
+    ACR_CLASS_PATH "Pointer32"
+};
+
+J_DECLARE_M_ID(0000) = {
+    NULL,
+    "<init>",
+    "(III)V"
+};
+
 #endif
 
-J_DECLARE_FIELD(IHANDLE,    I);
-J_DECLARE_FIELD(POINTER,    IFIELD_PTR);
-J_DECLARE_FIELD(CLEANUP,    IFIELD_PTR);
-J_DECLARE_FIELD(PLENGTH,    IFIELD_PTR);
+J_DECLARE_F_ID(0000) = {
+    NULL,
+    "POINTER",
+    IFIELD_PTR
+};
+
+J_DECLARE_F_ID(0001) = {
+    NULL,
+    "CLEANUP",
+    IFIELD_PTR
+};
+
+J_DECLARE_F_ID(0002) = {
+    NULL,
+    "PLENGTH",
+    IFIELD_PTR
+};
+
 
 ACR_CLASS_LDEF(AbstractPointer)
 {
@@ -53,10 +87,10 @@
 
     if ((rv = ACR_LoadClass(_E, &_clazzn, 0)) != ACR_SUCCESS)
         return rv;
-    J_LOAD_IFIELD(POINTER);
-    J_LOAD_IFIELD(CLEANUP);
-    J_LOAD_IFIELD(PLENGTH);
-    J_LOAD_METHOD(ctor0);
+    J_LOAD_IFIELD(0000);
+    J_LOAD_IFIELD(0001);
+    J_LOAD_IFIELD(0002);
+    J_LOAD_METHOD(0000);
 
     return ACR_SUCCESS;
 }
@@ -99,18 +133,18 @@
 
 ACR_JNI_EXPORT_DECLARE(void, AbstractPointer, cleanup0)(ACR_JNISTDARGS)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
+    if (_clazzn.i && J4MID(0000)) {
         acr_pointer_cleanup_fn_t *cleanup;
         void  *pointer;
 
-        pointer = GET_IFIELD_V(POINTER, _O, void *);
-        cleanup = GET_IFIELD_V(CLEANUP, _O, acr_pointer_cleanup_fn_t *);
+        pointer = GET_IFIELD_V(0000, _O, void *);
+        cleanup = GET_IFIELD_V(0001, _O, acr_pointer_cleanup_fn_t *);
         if (pointer) {
-            SET_IFIELD_P(POINTER, _O, NULL);
+            SET_IFIELD_P(0000, _O, NULL);
         }
         if (cleanup) {
             int rc;
-            size_t plength = (size_t)GET_IFIELD_P(PLENGTH, _O);
+            size_t plength = (size_t)GET_IFIELD_P(0002, _O);
             if ((rc = (*cleanup)(pointer, plength))) {
                 /* Throw RuntimeException with errno message */
                 ACR_ThrowException(_E, THROW_FMARK, ACR_EX_ERUNTIME, rc);
@@ -124,17 +158,17 @@
 
 ACR_JNI_EXPORT_DECLARE(void, AbstractPointer, cleanup1)(ACR_JNISTDARGS)
 {
-    if (_clazzn.i && J4MID(ctor0)) {
+    if (_clazzn.i && J4MID(0000)) {
         acr_pointer_cleanup_fn_t *cleanup;
         void  *pointer;
 
-        pointer = GET_IFIELD_V(POINTER, _O, void *);
-        cleanup = GET_IFIELD_V(CLEANUP, _O, acr_pointer_cleanup_fn_t *);
+        pointer = GET_IFIELD_V(0000, _O, void *);
+        cleanup = GET_IFIELD_V(0001, _O, acr_pointer_cleanup_fn_t *);
         if (pointer) {
-            SET_IFIELD_P(POINTER, _O, NULL);
+            SET_IFIELD_P(0000, _O, NULL);
         }
         if (cleanup) {
-            size_t plength = (size_t)GET_IFIELD_P(PLENGTH, _O);
+            size_t plength = (size_t)GET_IFIELD_P(0002, _O);
             (*cleanup)(pointer, plength);
         }
     }
@@ -223,8 +257,8 @@
 ACR_DECLARE(jobject) ACR_NewBasicPointer(JNIEnv *_E, void *p, size_t len,
                                          acr_pointer_cleanup_fn_t *cb)
 {
-    if (_clazzn.i && J4MID(ctor0))
-        return (*_E)->NewObject(_E, _clazzn.i, J4MID(ctor0),
+    if (_clazzn.i && J4MID(0000))
+        return (*_E)->NewObject(_E, _clazzn.i, J4MID(0000),
                                 P2N(p), P2N(cb), (acr_ptr_t)len);
     else {
         ACR_SET_OS_ERROR(ACR_ECLASSNOTFOUND);
@@ -234,7 +268,7 @@
 
 ACR_DECLARE(int) ACR_PointerCleanup(ACR_JNISTDARGS)
 {
-    if (_clazzn.i && J4MID(ctor0) && _O) {
+    if (_clazzn.i && J4MID(0000) && _O) {
         acr_pointer_cleanup_fn_t *cleanup;
         void  *pointer;
 
@@ -242,17 +276,17 @@
             /* Object locking failed */
             return ACR_ENOLOCK;
         }
-        pointer = GET_IFIELD_V(POINTER, _O, void *);
-        cleanup = GET_IFIELD_V(CLEANUP, _O, acr_pointer_cleanup_fn_t *);
+        pointer = GET_IFIELD_V(0000, _O, void *);
+        cleanup = GET_IFIELD_V(0001, _O, acr_pointer_cleanup_fn_t *);
         if (pointer) {
-            SET_IFIELD_P(POINTER, _O, NULL);
+            SET_IFIELD_P(0000, _O, NULL);
         }
         if (cleanup) {
-            SET_IFIELD_P(CLEANUP, _O, NULL);
+            SET_IFIELD_P(0001, _O, NULL);
         }
         (*_E)->MonitorExit(_E, _O);
         if (cleanup) {
-            size_t plength = (size_t)GET_IFIELD_P(PLENGTH, _O);
+            size_t plength = (size_t)GET_IFIELD_P(0002, _O);
             return (*cleanup)(pointer, plength);
         }
         else {
@@ -266,10 +300,10 @@
 
 ACR_DECLARE(void *) ACR_PointerGet(ACR_JNISTDARGS, size_t *len)
 {
-    if (_clazzn.i && J4MID(ctor0) && _O) {
-        void *pointer = GET_IFIELD_V(POINTER, _O, void *);
+    if (_clazzn.i && J4MID(0000) && _O) {
+        void *pointer = GET_IFIELD_V(0000, _O, void *);
         if (len) {
-            *len = (size_t)GET_IFIELD_P(PLENGTH, _O);
+            *len = (size_t)GET_IFIELD_P(0002, _O);
         }
         return pointer;
     }
@@ -281,15 +315,15 @@
 
 ACR_DECLARE(int) ACR_PointerSet(ACR_JNISTDARGS, void *p, size_t len)
 {
-    if (_clazzn.i && J4MID(ctor0) && _O) {
+    if (_clazzn.i && J4MID(0000) && _O) {
         if ((*_E)->MonitorEnter(_E, _O)) {
             /* Object locking failed */
             return ACR_ENOLOCK;
         }
 
-        SET_IFIELD_P(POINTER, _O, p);
+        SET_IFIELD_P(0000, _O, p);
         if (len) {
-            SET_IFIELD_P(PLENGTH, _O, len);
+            SET_IFIELD_P(0002, _O, len);
         }
         (*_E)->MonitorExit(_E, _O);
         return ACR_SUCCESS;
@@ -302,15 +336,15 @@
 ACR_DECLARE(int) ACR_PointerAttach(ACR_JNISTDARGS, void *p, size_t len,
                                    acr_pointer_cleanup_fn_t *cb)
 {
-    if (_clazzn.i && J4MID(ctor0) && _O) {
+    if (_clazzn.i && J4MID(0000) && _O) {
         if ((*_E)->MonitorEnter(_E, _O)) {
             /* Object locking failed */
             return ACR_ENOLOCK;
         }
 
-        SET_IFIELD_P(POINTER, _O, p);
-        SET_IFIELD_P(CLEANUP, _O, cb);
-        SET_IFIELD_P(PLENGTH, _O, len);
+        SET_IFIELD_P(0000, _O, p);
+        SET_IFIELD_P(0001, _O, cb);
+        SET_IFIELD_P(0002, _O, len);
 
         (*_E)->MonitorExit(_E, _O);
         return ACR_SUCCESS;
@@ -322,8 +356,8 @@
 
 ACR_DECLARE(acr_pointer_cleanup_fn_t *) ACR_PointerCallbackGet(ACR_JNISTDARGS)
 {
-    if (_clazzn.i && J4MID(ctor0) && _O) {
-        return GET_IFIELD_V(CLEANUP, _O, acr_pointer_cleanup_fn_t *);
+    if (_clazzn.i && J4MID(0000) && _O) {
+        return GET_IFIELD_V(0001, _O, acr_pointer_cleanup_fn_t *);
     }
     else {
         ACR_SET_OS_ERROR(ACR_ECLASSNOTFOUND);



Mime
View raw message