Mercurial Hosting > luan
comparison core/src/luan/LuanState.java @ 305:5e7450ac27f2
rename String.byte() to String.unicode();
improve Binary;
git-svn-id: https://luan-java.googlecode.com/svn/trunk@306 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Fri, 19 Dec 2014 07:50:46 +0000 |
parents | a6bf8ff720f8 |
children | f6db49c294a7 |
comparison
equal
deleted
inserted
replaced
304:03e9cda4748d | 305:5e7450ac27f2 |
---|---|
11 import luan.impl.LuanCompiler; | 11 import luan.impl.LuanCompiler; |
12 import luan.modules.BasicLuan; | 12 import luan.modules.BasicLuan; |
13 import luan.modules.PackageLuan; | 13 import luan.modules.PackageLuan; |
14 import luan.modules.JavaLuan; | 14 import luan.modules.JavaLuan; |
15 import luan.modules.StringLuan; | 15 import luan.modules.StringLuan; |
16 import luan.modules.BinaryLuan; | |
16 | 17 |
17 | 18 |
18 public abstract class LuanState implements DeepCloneable<LuanState> { | 19 public abstract class LuanState implements DeepCloneable<LuanState> { |
19 | 20 |
20 final List<StackTraceElement> stackTrace = new ArrayList<StackTraceElement>(); | 21 final List<StackTraceElement> stackTrace = new ArrayList<StackTraceElement>(); |
118 if( obj instanceof String ) { | 119 if( obj instanceof String ) { |
119 Object rtn = StringLuan.__index(luan,(String)obj,key); | 120 Object rtn = StringLuan.__index(luan,(String)obj,key); |
120 if( rtn != null ) | 121 if( rtn != null ) |
121 return rtn; | 122 return rtn; |
122 } | 123 } |
124 if( obj instanceof byte[] ) { | |
125 Object rtn = BinaryLuan.__index(luan,(byte[])obj,key); | |
126 if( rtn != null ) | |
127 return rtn; | |
128 } | |
123 return JavaLuan.__index(luan,obj,key); | 129 return JavaLuan.__index(luan,obj,key); |
124 } | 130 } |
125 | 131 |
126 public static void __newindex(LuanState luan,Object obj,Object key,Object value) throws LuanException { | 132 public static void __newindex(LuanState luan,Object obj,Object key,Object value) throws LuanException { |
127 JavaLuan.__newindex(luan,obj,key,value); | 133 JavaLuan.__newindex(luan,obj,key,value); |