diff src/luan/modules/JavaLuan.java @ 1562:b89212fd04b5

remove table.luan
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 08 Nov 2020 16:50:59 -0700
parents e1a13e707bf3
children 8fbcc4747091
line wrap: on
line diff
--- a/src/luan/modules/JavaLuan.java	Thu Nov 05 20:24:09 2020 -0700
+++ b/src/luan/modules/JavaLuan.java	Sun Nov 08 16:50:59 2020 -0700
@@ -302,7 +302,7 @@
 			return cls.isSynthetic();
 		}
 
-		public Object luan_proxy(final LuanTable t) throws LuanException {
+		public Object luan_proxy(Luan luan,final LuanTable t) throws LuanException {
 			return Proxy.newProxyInstance(
 				cls.getClassLoader(),
 				new Class[]{cls},
@@ -313,7 +313,7 @@
 						if( args==null )
 							args = new Object[0];
 						String name = method.getName();
-						Object fnObj = t.get(name);
+						Object fnObj = t.get(luan,name);
 						if( fnObj == null )
 							throw new NullPointerException("luan_proxy couldn't find method '"+name+"'");
 						LuanFunction fn = Luan.checkFunction(fnObj);
@@ -326,7 +326,7 @@
 	private static final Method luan_proxyMethod;
 	static {
 		try {
-			luan_proxyMethod = Static.class.getMethod("luan_proxy",LuanTable.class);
+			luan_proxyMethod = Static.class.getMethod("luan_proxy",Luan.class,LuanTable.class);
 			luan_proxyMethod.setAccessible(true);
 		} catch(NoSuchMethodException e) {
 			throw new RuntimeException(e);