Mercurial Hosting > luan
comparison src/luan/interp/LtExpr.java @ 37:8a57ebfdfd78
add JavaLib
git-svn-id: https://luan-java.googlecode.com/svn/trunk@38 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Thu, 20 Dec 2012 02:36:07 +0000 |
parents | e51906de0f11 |
children | e3624b7cd603 |
comparison
equal
deleted
inserted
replaced
36:2a35154aec14 | 37:8a57ebfdfd78 |
---|---|
23 if( o1 instanceof String && o2 instanceof String ) { | 23 if( o1 instanceof String && o2 instanceof String ) { |
24 String s1 = (String)o1; | 24 String s1 = (String)o1; |
25 String s2 = (String)o2; | 25 String s2 = (String)o2; |
26 return s1.compareTo(s2) < 0; | 26 return s1.compareTo(s2) < 0; |
27 } | 27 } |
28 LuaFunction fn = getBinHandler("__lt",o1,o2); | 28 LuaFunction fn = lua.getBinHandler("__lt",o1,o2); |
29 if( fn != null ) | 29 if( fn != null ) |
30 return Lua.toBoolean( Utils.first(fn.call(lua,o1,o2)) ); | 30 return Lua.toBoolean( Utils.first(fn.call(lua,o1,o2)) ); |
31 throw new LuaException( "attempt to compare " + Lua.type(o1) + " with " + Lua.type(o2) ); | 31 throw new LuaException( "attempt to compare " + Lua.type(o1) + " with " + Lua.type(o2) ); |
32 } | 32 } |
33 } | 33 } |