comparison core/src/luan/modules/RpcLuan.java @ 742:5578541125ea

add Hosting.caller()
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 12 Jul 2016 17:47:30 -0600
parents b620b8e1010f
children 4b8695f1cfc4
comparison
equal deleted inserted replaced
741:9f58b398a892 742:5578541125ea
71 int nArgs = readInt(in); 71 int nArgs = readInt(in);
72 Object[] args = new Object[nArgs]; 72 Object[] args = new Object[nArgs];
73 for( int i=0; i<nArgs; i++ ) { 73 for( int i=0; i<nArgs; i++ ) {
74 args[i] = readObj(in,luan); 74 args[i] = readObj(in,luan);
75 } 75 }
76 LuanFunction fn = (LuanFunction)fns.rawGet(fnName); 76 LuanFunction fn = (LuanFunction)fns.get(luan,fnName);
77 if( fn == null ) 77 if( fn == null )
78 throw new LuanException( "function not found: " + fnName ); 78 throw new LuanException( "function not found: " + fnName );
79 rtn = Luan.array(fn.call(luan,args)); 79 rtn = Luan.array(fn.call(luan,args));
80 } catch(LuanException e) { 80 } catch(LuanException e) {
81 writeBoolean(out,false); 81 writeBoolean(out,false);