Commits

Anonymous committed dce2d31

Moved destructing of return from getFrameLocals to implementation.

  • Participants
  • Parent commits dd7a75c

Comments (0)

Files changed (2)

src/org/lispdev/swank/LispImplementation.java

     }
     return res;
   }
+
+  public LispVariable[] getLispVariables(LispDebugTarget target, LispNode n)
+  {
+    if( n == null || n.getParamsCount() < 1 )
+    {
+      return new LispVariable[0];
+    }
+    LispVariable[] res = new LispVariable[n.getParamsCount()];
+    for( int i = 0; i < res.length; ++i )
+    {
+      LispNode ni = n.get(i);
+      res[i] = new LispVariable(target,
+          ni.getf(":name").value,ni.getf(":value").value);
+    }
+    return res;
+  }
 }

src/org/lispdev/swank/SwankInterface.java

     LispNode n = swank.sendEvalAndGrabRawWithThread(
         "(swank:frame-locals-for-emacs " + frameNum + ")",
         "nil", threadId, 2000);
-    if( n == null || n.getParamsCount() < 1 )
-    {
-      return new LispVariable[0];
-    }
-    LispVariable[] res = new LispVariable[n.getParamsCount()];
-    for( int i = 0; i < res.length; ++i )
-    {
-      LispNode ni = n.get(i);
-      res[i] = new LispVariable(target,
-          ni.getf(":name").value,ni.getf(":value").value);
-    }
-    return res;
+    return implementation.getLispVariables(target, n);
   }
 
   public synchronized void sendGetFrameSourceLocation(String frameNum,