Mercurial Hosting > luan
comparison core/src/luan/modules/BinaryLuan.java @ 409:abce9b0041b0
remove LuanState.require(), eval() is good enough
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 29 Apr 2015 15:26:54 -0600 |
parents | d55e873e1f0d |
children | 23a93c118042 |
comparison
equal
deleted
inserted
replaced
408:1b38de2b1845 | 409:abce9b0041b0 |
---|---|
9 | 9 |
10 | 10 |
11 public final class BinaryLuan { | 11 public final class BinaryLuan { |
12 | 12 |
13 public static Object __index(LuanState luan,final byte[] binary,Object key) throws LuanException { | 13 public static Object __index(LuanState luan,final byte[] binary,Object key) throws LuanException { |
14 LuanTable mod = (LuanTable)luan.require("luan:Binary"); | 14 LuanTable mod = (LuanTable)PackageLuan.require(luan,"luan:Binary"); |
15 Object obj = mod.get(key); | 15 Object obj = mod.get(key); |
16 if( obj instanceof LuanFunction ) { | 16 if( obj instanceof LuanFunction ) { |
17 final LuanFunction fn = (LuanFunction)obj; | 17 final LuanFunction fn = (LuanFunction)obj; |
18 return new LuanFunction() { | 18 return new LuanFunction() { |
19 @Override public Object call(LuanState luan,Object[] args) throws LuanException { | 19 @Override public Object call(LuanState luan,Object[] args) throws LuanException { |