Mercurial Hosting > luan
comparison src/luan/interp/FnCall.java @ 112:f5af13062b10
fix previous rev
git-svn-id: https://luan-java.googlecode.com/svn/trunk@113 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Fri, 23 May 2014 22:52:39 +0000 |
parents | 2428ecfed375 |
children | 14281d5bd36f |
comparison
equal
deleted
inserted
replaced
111:2428ecfed375 | 112:f5af13062b10 |
---|---|
23 } | 23 } |
24 | 24 |
25 private Object call(LuanStateImpl luan,Object o) throws LuanException { | 25 private Object call(LuanStateImpl luan,Object o) throws LuanException { |
26 if( o instanceof LuanFunction ) { | 26 if( o instanceof LuanFunction ) { |
27 LuanFunction fn = (LuanFunction)o; | 27 LuanFunction fn = (LuanFunction)o; |
28 return luan.bit(se).call( fn, fnName, args.eval(luan) ); | 28 return luan.bit(se).call( fn, fnName, Luan.array(args.eval(luan)) ); |
29 } | 29 } |
30 Object h = luan.getHandler("__call",o); | 30 Object h = luan.getHandler("__call",o); |
31 if( h != null ) | 31 if( h != null ) |
32 return call(luan,h); | 32 return call(luan,h); |
33 throw luan.bit(fnExpr.se()).exception( "attempt to call '"+fnExpr.se().text()+"' (a " + Luan.type(o) + " value)" ); | 33 throw luan.bit(fnExpr.se()).exception( "attempt to call '"+fnExpr.se().text()+"' (a " + Luan.type(o) + " value)" ); |