subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r926597 - in /subversion/trunk: build/generator/ subversion/bindings/javahl/native/
Date Tue, 23 Mar 2010 14:43:47 GMT
Author: rhuijben
Date: Tue Mar 23 14:43:47 2010
New Revision: 926597

URL: http://svn.apache.org/viewvc?rev=926597&view=rev
Log:
Fix the JavaHL build on Windows.

* build/generator/gen_win.py
  (GeneratorBase::get_configs): Target Java 1.5.

* subversion/bindings/javahl/native/JNIUtil.h
  (POP_AND_RETURN_NOTHING): New macro.

* subversion/bindings/javahl/native/JNIUtil.cpp
* subversion/bindings/javahl/native/ProgressListener.cpp
* subversion/bindings/javahl/native/Revision.cpp
* subversion/bindings/javahl/native/SVNAdmin.cpp
  (*): Update calls of POP_AND_RETURN() with no arguments to use
       POP_AND_RETURN_NOTHING()

Modified:
    subversion/trunk/build/generator/gen_win.py
    subversion/trunk/subversion/bindings/javahl/native/JNIUtil.cpp
    subversion/trunk/subversion/bindings/javahl/native/JNIUtil.h
    subversion/trunk/subversion/bindings/javahl/native/ProgressListener.cpp
    subversion/trunk/subversion/bindings/javahl/native/Revision.cpp

Modified: subversion/trunk/build/generator/gen_win.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_win.py?rev=926597&r1=926596&r2=926597&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_win.py (original)
+++ subversion/trunk/build/generator/gen_win.py Tue Mar 23 14:43:47 2010
@@ -504,7 +504,7 @@ class WinGeneratorBase(GeneratorBase):
 
           sourcepath = self.path(source.sourcepath)
 
-          cbuild = "%s -g -target 1.2 -source 1.3 -classpath %s -d %s " \
+          cbuild = "%s -g -target 1.5 -source 1.5 -classpath %s -d %s " \
                    "-sourcepath %s $(InputPath)" \
                    % tuple(map(self.quote, (javac_exe, classes,
                                             targetdir, sourcepath)))

Modified: subversion/trunk/subversion/bindings/javahl/native/JNIUtil.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/JNIUtil.cpp?rev=926597&r1=926596&r2=926597&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/JNIUtil.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/JNIUtil.cpp Tue Mar 23 14:43:47 2010
@@ -355,23 +355,23 @@ JNIUtil::throwNativeException(const char
       g_logStream << std::endl;
     }
   if (isJavaExceptionThrown())
-    POP_AND_RETURN();
+    POP_AND_RETURN_NOTHING();
 
   jstring jmessage = makeJString(msg);
   if (isJavaExceptionThrown())
-    POP_AND_RETURN();
+    POP_AND_RETURN_NOTHING();
   jstring jsource = makeJString(source);
   if (isJavaExceptionThrown())
-    POP_AND_RETURN();
+    POP_AND_RETURN_NOTHING();
 
   jmethodID mid = env->GetMethodID(clazz, "<init>",
                                    "(Ljava/lang/String;Ljava/lang/String;I)V");
   if (isJavaExceptionThrown())
-    POP_AND_RETURN();
+    POP_AND_RETURN_NOTHING();
   jobject nativeException = env->NewObject(clazz, mid, jmessage, jsource,
                                            static_cast<jint>(aprErr));
   if (isJavaExceptionThrown())
-    POP_AND_RETURN();
+    POP_AND_RETURN_NOTHING();
 
   env->Throw(static_cast<jthrowable>(env->PopLocalFrame(nativeException)));
 }

Modified: subversion/trunk/subversion/bindings/javahl/native/JNIUtil.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/JNIUtil.h?rev=926597&r1=926596&r2=926597&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/JNIUtil.h (original)
+++ subversion/trunk/subversion/bindings/javahl/native/JNIUtil.h Tue Mar 23 14:43:47 2010
@@ -261,6 +261,18 @@ class JNIUtil
   while (0)
 
 /**
+ * A statement macro use to pop the reference frame and return
+ */
+#define POP_AND_RETURN_NOTHING()        \
+  do                                    \
+    {                                   \
+      env->PopLocalFrame(NULL);         \
+      return;                           \
+    }                                   \
+  while (0)
+
+
+/**
  * A useful macro.
  */
 #define POP_AND_RETURN_NULL             POP_AND_RETURN(NULL)

Modified: subversion/trunk/subversion/bindings/javahl/native/ProgressListener.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/ProgressListener.cpp?rev=926597&r1=926596&r2=926597&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/ProgressListener.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/ProgressListener.cpp Tue Mar 23 14:43:47
2010
@@ -100,33 +100,33 @@ ProgressListener::onProgress(apr_off_t p
       // Initialize the method ID.
       jclass clazz = env->FindClass(JAVA_PACKAGE"/ProgressListener");
       if (JNIUtil::isJavaExceptionThrown())
-        POP_AND_RETURN();
+        POP_AND_RETURN_NOTHING();
 
       mid = env->GetMethodID(clazz, "onProgress",
                              "(L"JAVA_PACKAGE"/ProgressEvent;)V");
       if (JNIUtil::isJavaExceptionThrown() || mid == 0)
-        POP_AND_RETURN();
+        POP_AND_RETURN_NOTHING();
     }
 
   static jmethodID midCT = 0;
   jclass clazz = env->FindClass(JAVA_PACKAGE"/ProgressEvent");
   if (JNIUtil::isJavaExceptionThrown())
-    POP_AND_RETURN();
+    POP_AND_RETURN_NOTHING();
 
   if (midCT == 0)
     {
       midCT = env->GetMethodID(clazz, "<init>", "(JJ)V");
       if (JNIUtil::isJavaExceptionThrown() || midCT == 0)
-        POP_AND_RETURN();
+        POP_AND_RETURN_NOTHING();
     }
 
   // Call the Java method.
   jobject jevent = env->NewObject(clazz, midCT,
                                   (jlong) progressVal, (jlong) total);
   if (JNIUtil::isJavaExceptionThrown())
-    POP_AND_RETURN();
+    POP_AND_RETURN_NOTHING();
 
   env->CallVoidMethod(m_progressListener, mid, jevent);
   
-  POP_AND_RETURN();
+  POP_AND_RETURN_NOTHING();
 }

Modified: subversion/trunk/subversion/bindings/javahl/native/Revision.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/Revision.cpp?rev=926597&r1=926596&r2=926597&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/Revision.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/Revision.cpp Tue Mar 23 14:43:47 2010
@@ -59,16 +59,16 @@ Revision::Revision(jobject jthis, bool h
         {
           jclass clazz = env->FindClass(JAVA_PACKAGE"/Revision");
           if (JNIUtil::isJavaExceptionThrown())
-            POP_AND_RETURN();
+            POP_AND_RETURN_NOTHING();
 
           fid = env->GetFieldID(clazz, "revKind",
                                 "L"JAVA_PACKAGE"/Revision$Kind;");
           if (JNIUtil::isJavaExceptionThrown())
-            POP_AND_RETURN();
+            POP_AND_RETURN_NOTHING();
         }
       jobject jKind = env->GetObjectField(jthis, fid);
       if (JNIUtil::isJavaExceptionThrown())
-        POP_AND_RETURN();
+        POP_AND_RETURN_NOTHING();
 
       m_revision.value.number = 0;
       m_revision.kind = EnumMapper::toRevisionKind(jKind);
@@ -83,11 +83,11 @@ Revision::Revision(jobject jthis, bool h
                 jclass clazz =
                   env->FindClass(JAVA_PACKAGE"/Revision$Number");
                 if (JNIUtil::isJavaExceptionThrown())
-                  POP_AND_RETURN();
+                  POP_AND_RETURN_NOTHING();
 
                 fidNum = env->GetFieldID(clazz, "revNumber", "J");
                 if (JNIUtil::isJavaExceptionThrown())
-                  POP_AND_RETURN();
+                  POP_AND_RETURN_NOTHING();
               }
             jlong jNumber = env->GetLongField(jthis, fidNum);
             m_revision.value.number = (svn_revnum_t) jNumber;
@@ -101,31 +101,31 @@ Revision::Revision(jobject jthis, bool h
                 jclass clazz =
                   env->FindClass(JAVA_PACKAGE"/Revision$DateSpec");
                 if (JNIUtil::isJavaExceptionThrown())
-                  POP_AND_RETURN();
+                  POP_AND_RETURN_NOTHING();
 
                 fidDate = env->GetFieldID(clazz, "revDate",
                                           "Ljava/util/Date;");
                 if (JNIUtil::isJavaExceptionThrown())
-                  POP_AND_RETURN();
+                  POP_AND_RETURN_NOTHING();
               }
             jobject jDate = env->GetObjectField(jthis, fidDate);
             if (JNIUtil::isJavaExceptionThrown())
-              POP_AND_RETURN();
+              POP_AND_RETURN_NOTHING();
 
             static jmethodID mid = 0;
             if (mid == 0)
               {
                 jclass clazz = env->FindClass("java/util/Date");
                 if (JNIUtil::isJavaExceptionThrown())
-                  POP_AND_RETURN();
+                  POP_AND_RETURN_NOTHING();
 
                 mid = env->GetMethodID(clazz, "getTime", "()J");
                 if (JNIUtil::isJavaExceptionThrown())
-                  POP_AND_RETURN();
+                  POP_AND_RETURN_NOTHING();
               }
             jlong jMillSec = env->CallLongMethod(jDate, mid);
             if (JNIUtil::isJavaExceptionThrown())
-              POP_AND_RETURN();
+              POP_AND_RETURN_NOTHING();
 
             m_revision.value.date = jMillSec * 1000;
           }



Mime
View raw message