[armedbear-cvs] r11859 - trunk/abcl/src/org/armedbear/lisp

Alessio Stalla astalla at common-lisp.net
Wed May 13 19:07:12 UTC 2009


Author: astalla
Date: Wed May 13 15:07:10 2009
New Revision: 11859

Log:
Corrected previous commit: JProxy uses APPLY and not FUNCALL.


Modified:
   trunk/abcl/src/org/armedbear/lisp/JProxy.java

Modified: trunk/abcl/src/org/armedbear/lisp/JProxy.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/JProxy.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/JProxy.java	Wed May 13 15:07:10 2009
@@ -177,17 +177,17 @@
 	    if(args == null) {
 		args = new Object[0];
 	    }
-	    LispObject[] lispArgs = new LispObject[args.length + 3];
-	    lispArgs[0] = function;
+	    LispObject lispArgs = NIL;
 	    synchronized(proxyMap) {
-		lispArgs[1] = toLispObject(proxyMap.get(proxy));
+		lispArgs = lispArgs.push(toLispObject(proxyMap.get(proxy)));
 	    }
-	    lispArgs[2] = new SimpleString(method.getName());
+	    lispArgs = lispArgs.push(new SimpleString(method.getName()));
 	    for(int i = 0; i < args.length; i++) {
-		lispArgs[i + 3] = toLispObject(args[i]);
+		lispArgs = lispArgs.push(toLispObject(args[i]));
 	    }
 	    Object retVal =
-		LispThread.currentThread().execute(Symbol.FUNCALL, lispArgs).javaInstance();
+		LispThread.currentThread().execute
+		(Symbol.APPLY, function, lispArgs.reverse()).javaInstance();
 	    //(function.execute(lispArgs)).javaInstance();
 	    /* DOES NOT WORK due to autoboxing!
 	       if(retVal != null && !method.getReturnType().isAssignableFrom(retVal.getClass())) {




More information about the armedbear-cvs mailing list