changeset 122:d00f41edbbd6

minor git-svn-id: https://luan-java.googlecode.com/svn/trunk@123 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Wed, 04 Jun 2014 06:15:47 +0000
parents cba7ed3f06cc
children d7be9b3abf1a
files src/luan/lib/HttpLib.java src/luan/lib/IoLib.java src/luan/tools/WebRun.java src/luan/tools/WebShell.java
diffstat 4 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/luan/lib/HttpLib.java	Mon Jun 02 05:49:17 2014 +0000
+++ b/src/luan/lib/HttpLib.java	Wed Jun 04 06:15:47 2014 +0000
@@ -36,7 +36,7 @@
 	{
 		LuanFunction fn = (LuanFunction)luan.get(FN_NAME);
 		ServletOutputStream sout = response.getOutputStream();
-		luan.set( "Io.stdout", IoLib.writer(new PrintStream(sout)) );
+		luan.set( "Io.stdout", IoLib.textWriter(new PrintStream(sout)) );
 
 		LuanTable module = (LuanTable)luan.loaded().get(NAME);
 
--- a/src/luan/lib/IoLib.java	Mon Jun 02 05:49:17 2014 +0000
+++ b/src/luan/lib/IoLib.java	Wed Jun 04 06:15:47 2014 +0000
@@ -53,8 +53,8 @@
 			} catch(NoSuchMethodException e) {
 				throw new RuntimeException(e);
 			}
-			module.put( "stdout", writer(System.out) );
-			module.put( "stderr", writer(System.err) );
+			module.put( "stdout", textWriter(System.out) );
+			module.put( "stderr", textWriter(System.err) );
 			return module;
 		}
 	};
@@ -93,7 +93,7 @@
 		}
 
 		public LuanTable text_writer() throws IOException {
-			return writer(new FileWriter(file));
+			return textWriter(new FileWriter(file));
 		}
 
 		public LuanTable binary_writer() throws IOException {
@@ -235,7 +235,7 @@
 		public void close() throws IOException;
 	}
 
-	public static LuanTable writer(final PrintStream out) {
+	public static LuanTable textWriter(final PrintStream out) {
 		LuanWriter luanWriter = new LuanWriter() {
 
 			public void write(LuanState luan,Object... args) throws LuanException {
@@ -251,7 +251,7 @@
 		return writer(luanWriter);
 	}
 
-	public static LuanTable writer(final Writer out) {
+	public static LuanTable textWriter(final Writer out) {
 		LuanWriter luanWriter = new LuanWriter() {
 
 			public void write(LuanState luan,Object... args) throws LuanException, IOException {
--- a/src/luan/tools/WebRun.java	Mon Jun 02 05:49:17 2014 +0000
+++ b/src/luan/tools/WebRun.java	Wed Jun 04 06:15:47 2014 +0000
@@ -34,7 +34,7 @@
 		String code = request.getParameter("code");
 		try {
 			LuanState luan = newLuanState();
-			luan.set( "Io.stdout", IoLib.writer(out) );
+			luan.set( "Io.stdout", IoLib.textWriter(out) );
 			LuanTable env = luan.global();
 			env.put("request",request);
 			env.put("response",response);
--- a/src/luan/tools/WebShell.java	Mon Jun 02 05:49:17 2014 +0000
+++ b/src/luan/tools/WebShell.java	Wed Jun 04 06:15:47 2014 +0000
@@ -60,7 +60,7 @@
 						luan = newLuanState();
 						session.putValue("luan",luan);
 					}
-					luan.set( "Io.stdout", IoLib.writer(new PrintStream(history)) );
+					luan.set( "Io.stdout", IoLib.textWriter(new PrintStream(history)) );
 					LuanTable env = luan.global();
 					env.put("request",request);
 					env.put("response",response);