comparison src/luan/modules/BasicLuan.java @ 1334:c88b486a9511

make some Luan methods static
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 12 Feb 2019 22:53:57 -0700
parents 25746915a241
children e0cf0d108a77
comparison
equal deleted inserted replaced
1333:25746915a241 1334:c88b486a9511
101 return t.rawLength(); 101 return t.rawLength();
102 } 102 }
103 throw new LuanException( "bad argument #1 to 'raw_len' (table or string expected)" ); 103 throw new LuanException( "bad argument #1 to 'raw_len' (table or string expected)" );
104 } 104 }
105 105
106 public static String to_string(Luan luan,Object v) throws LuanException { 106 public static String to_string(Object v) throws LuanException {
107 return luan.toString(v); 107 return Luan.luanToString(v);
108 } 108 }
109 109
110 public static LuanTable new_error(Luan luan,Object msg) throws LuanException { 110 public static LuanTable new_error(Luan luan,Object msg) throws LuanException {
111 String s = luan.toString(msg); 111 String s = Luan.luanToString(msg);
112 LuanTable tbl = new LuanException(s).table(luan); 112 LuanTable tbl = new LuanException(s).table(luan);
113 tbl.rawPut( "message", msg ); 113 tbl.rawPut( "message", msg );
114 return tbl; 114 return tbl;
115 } 115 }
116 116