changeset 81:9df729fa4419

minor git-svn-id: https://luan-java.googlecode.com/svn/trunk@82 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Sat, 16 Feb 2013 06:58:00 +0000
parents 851e356101c1
children 8ea2e94f3318
files src/luan/LuanTable.java src/luan/tools/WebServlet.java
diffstat 2 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/luan/LuanTable.java	Fri Feb 15 23:59:32 2013 +0000
+++ b/src/luan/LuanTable.java	Sat Feb 16 06:58:00 2013 +0000
@@ -13,7 +13,7 @@
 import java.util.IdentityHashMap;
 
 
-public class LuanTable implements DeepCloneable<LuanTable> {
+public final class LuanTable implements DeepCloneable<LuanTable> {
 	private Map<Object,Object> map = null;
 	private List<Object> list = null;
 	private LuanTable metatable = null;
@@ -102,11 +102,14 @@
 	}
 
 	@Override public String toString() {
+		return "table: " + Integer.toHexString(hashCode());
+	}
+/*
+	@Override public String toString() {
 		return toString( Collections.newSetFromMap(new IdentityHashMap<LuanTable,Boolean>()) );
 	}
 
 	private String toString(Set<LuanTable> set) {
-//		return "table: " + Integer.toHexString(hashCode());
 		if( !set.add(this) ) {
 			return "...";
 		}
@@ -153,7 +156,7 @@
 			return Luan.toString(obj);
 		}
 	}
-
+*/
 	public Object get(Object key) {
 		if( list != null ) {
 			Integer iT = Luan.asInteger(key);
--- a/src/luan/tools/WebServlet.java	Fri Feb 15 23:59:32 2013 +0000
+++ b/src/luan/tools/WebServlet.java	Sat Feb 16 06:58:00 2013 +0000
@@ -50,7 +50,7 @@
 		return luan;
 	}
 
-	protected  LuanState getLuanState() throws LuanException {
+	protected  LuanState getLuanState(HttpServletRequest request) throws LuanException {
 		synchronized(this) {
 			if( luanState == null )
 				luanState = newLuanState();
@@ -62,7 +62,7 @@
 		throws ServletException, IOException
 	{
 		try {
-			LuanState luan = getLuanState();
+			LuanState luan = getLuanState(request);
 			HttpLib.service(luan,request,response);
 		} catch(LuanException e) {
 			throw new LuanRuntimeException(e);