comparison src/luan/lib/HtmlLib.java @ 77:4bf3d0c0b6b9

make LuanState cloneable git-svn-id: https://luan-java.googlecode.com/svn/trunk@78 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Fri, 15 Feb 2013 09:55:17 +0000
parents f003338d503b
children 6db8f286fa6c
comparison
equal deleted inserted replaced
76:97b03fc807ad 77:4bf3d0c0b6b9
11 public static final String NAME = "html"; 11 public static final String NAME = "html";
12 12
13 public static final LuanFunction LOADER = new LuanFunction() { 13 public static final LuanFunction LOADER = new LuanFunction() {
14 public Object[] call(LuanState luan,Object[] args) { 14 public Object[] call(LuanState luan,Object[] args) {
15 LuanTable module = new LuanTable(); 15 LuanTable module = new LuanTable();
16 LuanTable global = luan.global; 16 LuanTable global = luan.global();
17 try { 17 try {
18 add( module, "encode", String.class ); 18 add( module, "encode", String.class );
19 } catch(NoSuchMethodException e) { 19 } catch(NoSuchMethodException e) {
20 throw new RuntimeException(e); 20 throw new RuntimeException(e);
21 } 21 }