Mercurial Hosting > luan
comparison src/luan/tools/CmdLine.java @ 77:4bf3d0c0b6b9
make LuanState cloneable
git-svn-id: https://luan-java.googlecode.com/svn/trunk@78 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Fri, 15 Feb 2013 09:55:17 +0000 |
parents | f86e4f77ef32 |
children | 6db8f286fa6c |
comparison
equal
deleted
inserted
replaced
76:97b03fc807ad | 77:4bf3d0c0b6b9 |
---|---|
63 System.arraycopy(args,1,varArgs,0,varArgs.length); | 63 System.arraycopy(args,1,varArgs,0,varArgs.length); |
64 LuanTable argsTable = new LuanTable(); | 64 LuanTable argsTable = new LuanTable(); |
65 for( int j=0; j<args.length; j++ ) { | 65 for( int j=0; j<args.length; j++ ) { |
66 argsTable.put( j, args[j] ); | 66 argsTable.put( j, args[j] ); |
67 } | 67 } |
68 luan.global.put("arg",argsTable); | 68 luan.global().put("arg",argsTable); |
69 try { | 69 try { |
70 LuanFunction fn = BasicLib.load_file(luan,file); | 70 LuanFunction fn = BasicLib.load_file(luan,file); |
71 luan.call(fn,null,null,varArgs); | 71 luan.call(fn,null,null,varArgs); |
72 } catch(LuanException e) { | 72 } catch(LuanException e) { |
73 // System.err.println("error: "+e.getMessage()); | 73 // System.err.println("error: "+e.getMessage()); |