Mercurial Hosting > luan
comparison src/luan/lib/BasicLib.java @ 46:a443637829c1
remove LuaNumber
git-svn-id: https://luan-java.googlecode.com/svn/trunk@47 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Thu, 27 Dec 2012 01:48:36 +0000 |
parents | 57054fa43189 |
children | 64ecb7a3aad7 |
comparison
equal
deleted
inserted
replaced
45:b1b14d09fc98 | 46:a443637829c1 |
---|---|
9 import java.util.Iterator; | 9 import java.util.Iterator; |
10 import java.util.Map; | 10 import java.util.Map; |
11 import luan.Lua; | 11 import luan.Lua; |
12 import luan.LuaState; | 12 import luan.LuaState; |
13 import luan.LuaTable; | 13 import luan.LuaTable; |
14 import luan.LuaNumber; | |
15 import luan.LuaFunction; | 14 import luan.LuaFunction; |
16 import luan.LuaJavaFunction; | 15 import luan.LuaJavaFunction; |
17 import luan.LuaException; | 16 import luan.LuaException; |
18 import luan.LuaSource; | 17 import luan.LuaSource; |
19 import luan.LuaElement; | 18 import luan.LuaElement; |
172 return t.length(); | 171 return t.length(); |
173 } | 172 } |
174 throw new LuaException( lua, LuaElement.JAVA, "bad argument #1 to 'raw_len' (table or string expected)" ); | 173 throw new LuaException( lua, LuaElement.JAVA, "bad argument #1 to 'raw_len' (table or string expected)" ); |
175 } | 174 } |
176 | 175 |
177 public static LuaNumber to_number(Object e,Integer base) { | 176 public static Number to_number(Object e,Integer base) { |
178 return Lua.toNumber(e,base); | 177 return Lua.toNumber(e,base); |
179 } | 178 } |
180 | 179 |
181 public static String to_string(LuaState lua,Object v) throws LuaException { | 180 public static String to_string(LuaState lua,Object v) throws LuaException { |
182 return lua.toString(LuaElement.JAVA,v); | 181 return lua.toString(LuaElement.JAVA,v); |