[Armedbear-cvs] r14688 - in branches/1.3.1: src/org/armedbear/lisp test/lisp/abcl

mevenson at common-lisp.net mevenson at common-lisp.net
Fri Apr 18 06:15:47 UTC 2014


Author: mevenson
Date: Fri Apr 18 06:15:47 2014
New Revision: 14688

Log:
Backport r14687:  Fix loading of JNA with recent JCALL improvements.

>From Olof.

Modified:
   branches/1.3.1/src/org/armedbear/lisp/Java.java
   branches/1.3.1/test/lisp/abcl/java-tests.lisp

Modified: branches/1.3.1/src/org/armedbear/lisp/Java.java
==============================================================================
--- branches/1.3.1/src/org/armedbear/lisp/Java.java	Fri Apr 18 06:03:27 2014	(r14687)
+++ branches/1.3.1/src/org/armedbear/lisp/Java.java	Fri Apr 18 06:15:47 2014	(r14688)
@@ -1065,7 +1065,9 @@
         for (int i = 0; i < methodTypes.length; ++i) {
             Class<?> methodType = methodTypes[i];
             Object arg = args[i];
-            if (!isAssignable(arg.getClass(), methodType)) {
+            if (arg == null) {
+                return !methodType.isPrimitive();
+            } else if (!isAssignable(arg.getClass(), methodType)) {
                 return false;
             }
         }

Modified: branches/1.3.1/test/lisp/abcl/java-tests.lisp
==============================================================================
--- branches/1.3.1/test/lisp/abcl/java-tests.lisp	Fri Apr 18 06:03:27 2014	(r14687)
+++ branches/1.3.1/test/lisp/abcl/java-tests.lisp	Fri Apr 18 06:15:47 2014	(r14688)
@@ -203,6 +203,11 @@
   (jcall "offsetByCodePoints" "foobar" 0 #\Nul)
   0)
 
+(deftest jcall.7
+  (signals-error (jcall "offsetByCodePoints" "foobar" 0 nil)
+                 #+abcl    'java-exception
+                 #+allegro 'jlinker-error))
+
 (deftest jfield.1
   (type-of (jfield "java.lang.Integer" "TYPE"))
   #+abcl    java-object




More information about the armedbear-cvs mailing list