diff src/luan/LuanClosure.java @ 1400:221eedb0f54e

fix inner class gc bug
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 13 Sep 2019 05:05:51 -0600
parents 643cf1c37723
children e1a13e707bf3
line wrap: on
line diff
--- a/src/luan/LuanClosure.java	Wed Sep 11 16:28:38 2019 -0600
+++ b/src/luan/LuanClosure.java	Fri Sep 13 05:05:51 2019 -0600
@@ -8,9 +8,9 @@
 	public boolean javaOk;
 	public final String sourceName;
 
-	public LuanClosure(Luan luan,int nUpValues,boolean javaOk,String sourceName) throws LuanException {
+	public LuanClosure(Luan luan,Pointer[] upValues,boolean javaOk,String sourceName) throws LuanException {
 		super(luan);
-		this.upValues = new Pointer[nUpValues];
+		this.upValues = upValues;
 		this.javaOk = javaOk;
 		this.sourceName = sourceName;
 	}
@@ -21,7 +21,7 @@
 		super.completeClone(dc,cloner);
 	}
 
-	@Override public final Object call(Object[] args) throws LuanException {
+	@Override public final Object call(Object... args) throws LuanException {
 		Luan luan = luan();
 		luan.push(this);
 		try {