diff core/src/luan/impl/LenExpr.java @ 432:d9df6d6cb927

finish fixing LuanTable to use metatables
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 02 May 2015 23:41:59 -0600
parents d55e873e1f0d
children b48cfa14ba60
line wrap: on
line diff
--- a/core/src/luan/impl/LenExpr.java	Sat May 02 21:12:48 2015 -0600
+++ b/core/src/luan/impl/LenExpr.java	Sat May 02 23:41:59 2015 -0600
@@ -28,9 +28,6 @@
 		if( !(o instanceof LuanTable) )
 			throw bit.exception( "attempt to get length of a " + Luan.type(o) + " value" );
 		LuanTable t = (LuanTable)o;
-		LuanFunction fn = bit.getHandlerFunction("__len",t);
-		if( fn != null )
-			return Luan.first(bit.call(fn,"__len",new Object[]{o}));
-		return t.length();
+		return t.length(luan);
 	}
 }