Author: mturk
Date: Mon Sep 5 17:46:02 2011
New Revision: 1165371
URL: http://svn.apache.org/viewvc?rev=1165371&view=rev
Log:
Add native equals methods
Modified:
commons/sandbox/runtime/trunk/src/main/native/os/unix/group.c
commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c
Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/group.c
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/group.c?rev=1165371&r1=1165370&r2=1165371&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/group.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/group.c Mon Sep 5
17:46:02 2011
@@ -257,6 +257,14 @@ ACR_JNI_EXPORT(int, Group, init0)(JNI_ST
return 4;
}
+ACR_JNI_EXPORT(jboolean, Group, equals0)(JNI_STDARGS, jlong a, jlong b)
+{
+ if (a == 0)
+ return b == 0 ? JNI_TRUE : JNI_FALSE;
+ else
+ return a == b ? JNI_TRUE : JNI_FALSE;
+}
+
ACR_JNI_EXPORT(jobject, Group, get0)(JNI_STDARGS, jstring name,
jbyteArray buf)
{
Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c?rev=1165371&r1=1165370&r2=1165371&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c Mon Sep 5
17:46:02 2011
@@ -292,6 +292,14 @@ ACR_JNI_EXPORT(int, User, init0)(JNI_STD
return 4;
}
+ACR_JNI_EXPORT(jboolean, User, equals0)(JNI_STDARGS, jlong a, jlong b)
+{
+ if (a == 0)
+ return b == 0 ? JNI_TRUE : JNI_FALSE;
+ else
+ return a == b ? JNI_TRUE : JNI_FALSE;
+}
+
ACR_JNI_EXPORT(jobject, User, get0)(JNI_STDARGS, jstring name,
jbyteArray buf)
{