Mercurial Hosting > luan
comparison core/src/luan/modules/BasicLuan.java @ 473:bab5607a0eed
move do_file implementation to luan
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 10 May 2015 00:25:48 -0600 |
parents | f3a24435d04d |
children | 5d4a78c93383 |
comparison
equal
deleted
inserted
replaced
472:f4aca5a5346a | 473:bab5607a0eed |
---|---|
41 if( src == null ) | 41 if( src == null ) |
42 throw luan.exception( "file '"+fileName+"' not found" ); | 42 throw luan.exception( "file '"+fileName+"' not found" ); |
43 return load(luan,src,fileName,null,false); | 43 return load(luan,src,fileName,null,false); |
44 } | 44 } |
45 | 45 |
46 public static Object do_file(LuanState luan,String fileName) throws LuanException { | |
47 LuanFunction fn = load_file(luan,fileName,null); | |
48 return luan.call(fn); | |
49 } | |
50 | |
51 public static LuanFunction pairs(final LuanState luan,final LuanTable t) throws LuanException { | 46 public static LuanFunction pairs(final LuanState luan,final LuanTable t) throws LuanException { |
52 Utils.checkNotNull(luan,t); | 47 Utils.checkNotNull(luan,t); |
53 return t.pairs(luan); | 48 return t.pairs(luan); |
54 } | 49 } |
55 | 50 |