changeset 142:05f8c21160ef

minor git-svn-id: https://luan-java.googlecode.com/svn/trunk@143 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Fri, 13 Jun 2014 17:05:31 +0000
parents c2ee8a717b73
children fcb81fa2df0d
files src/luan/LuanState.java src/luan/lib/BasicLib.java src/luan/lib/BinaryLib.java src/luan/lib/HtmlLib.java src/luan/lib/HttpLib.java src/luan/lib/IoLib.java src/luan/lib/JavaLib.java src/luan/lib/MathLib.java src/luan/lib/PackageLib.java src/luan/lib/StringLib.java src/luan/lib/TableLib.java src/luan/lib/ThreadLib.java
diffstat 12 files changed, 2 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/src/luan/LuanState.java	Fri Jun 13 16:37:49 2014 +0000
+++ b/src/luan/LuanState.java	Fri Jun 13 17:05:31 2014 +0000
@@ -142,7 +142,7 @@
 	public static LuanState newStandard() {
 		try {
 			LuanState luan = LuanCompiler.newLuanState();
-			luan.load(PackageLib.NAME,PackageLib.LOADER);
+			luan.load("Package",PackageLib.LOADER);
 			BasicLib.do_java_resource(luan,"luan/lib/init.luan");
 			return luan;
 		} catch(LuanException e) {
--- a/src/luan/lib/BasicLib.java	Fri Jun 13 16:37:49 2014 +0000
+++ b/src/luan/lib/BasicLib.java	Fri Jun 13 17:05:31 2014 +0000
@@ -21,8 +21,6 @@
 
 public final class BasicLib {
 
-	public static final String NAME = "Basic";
-
 	public static final LuanFunction LOADER = new LuanFunction() {
 		@Override public Object call(LuanState luan,Object[] args) {
 			LuanTable module = new LuanTable();
--- a/src/luan/lib/BinaryLib.java	Fri Jun 13 16:37:49 2014 +0000
+++ b/src/luan/lib/BinaryLib.java	Fri Jun 13 17:05:31 2014 +0000
@@ -9,8 +9,6 @@
 
 public final class BinaryLib {
 
-	public static final String NAME = "Binary";
-
 	public static final LuanFunction LOADER = new LuanFunction() {
 		@Override public Object call(LuanState luan,Object[] args) {
 			LuanTable module = new LuanTable();
--- a/src/luan/lib/HtmlLib.java	Fri Jun 13 16:37:49 2014 +0000
+++ b/src/luan/lib/HtmlLib.java	Fri Jun 13 17:05:31 2014 +0000
@@ -9,8 +9,6 @@
 
 public final class HtmlLib {
 
-	public static final String NAME = "Html";
-
 	public static final LuanFunction LOADER = new LuanFunction() {
 		@Override public Object call(LuanState luan,Object[] args) {
 			LuanTable module = new LuanTable();
--- a/src/luan/lib/HttpLib.java	Fri Jun 13 16:37:49 2014 +0000
+++ b/src/luan/lib/HttpLib.java	Fri Jun 13 17:05:31 2014 +0000
@@ -24,8 +24,6 @@
 
 public final class HttpLib {
 
-	public static final String NAME = "Http";
-
 	public static final LuanFunction LOADER = new LuanFunction() {
 		@Override public Object call(LuanState luan,Object[] args) {
 			return new LuanTable();  // starts empty
@@ -63,7 +61,7 @@
 			}
 		}
 
-		LuanTable module = (LuanTable)luan.loaded().get(NAME);
+		LuanTable module = (LuanTable)luan.loaded().get("Http");
 		if( module == null )
 			throw luan.exception( "module 'Http' not defined" );
 		HttpLib lib = new HttpLib(request,response);
--- a/src/luan/lib/IoLib.java	Fri Jun 13 16:37:49 2014 +0000
+++ b/src/luan/lib/IoLib.java	Fri Jun 13 17:05:31 2014 +0000
@@ -33,8 +33,6 @@
 
 public final class IoLib {
 
-	public static final String NAME = "Io";
-
 	public static final LuanFunction LOADER = new LuanFunction() {
 		@Override public Object call(LuanState luan,Object[] args) {
 			LuanTable module = new LuanTable();
--- a/src/luan/lib/JavaLib.java	Fri Jun 13 16:37:49 2014 +0000
+++ b/src/luan/lib/JavaLib.java	Fri Jun 13 17:05:31 2014 +0000
@@ -27,8 +27,6 @@
 
 public final class JavaLib {
 
-	public static final String NAME = "Java";
-
 	public static final LuanFunction LOADER = new LuanFunction() {
 		@Override public Object call(LuanState luan,Object[] args) {
 			luan.addMetatableGetter(mg);
--- a/src/luan/lib/MathLib.java	Fri Jun 13 16:37:49 2014 +0000
+++ b/src/luan/lib/MathLib.java	Fri Jun 13 17:05:31 2014 +0000
@@ -9,8 +9,6 @@
 
 public final class MathLib {
 
-	public static final String NAME = "Math";
-
 	public static final LuanFunction LOADER = new LuanFunction() {
 		@Override public Object call(LuanState luan,Object[] args) {
 			LuanTable module = new LuanTable();
--- a/src/luan/lib/PackageLib.java	Fri Jun 13 16:37:49 2014 +0000
+++ b/src/luan/lib/PackageLib.java	Fri Jun 13 17:05:31 2014 +0000
@@ -17,8 +17,6 @@
 
 public final class PackageLib {
 
-	public static final String NAME = "Package";
-
 	public static final LuanFunction LOADER = new LuanFunction() {
 		@Override public Object call(LuanState luan,Object[] args) {
 			LuanTable module = new LuanTable();
--- a/src/luan/lib/StringLib.java	Fri Jun 13 16:37:49 2014 +0000
+++ b/src/luan/lib/StringLib.java	Fri Jun 13 17:05:31 2014 +0000
@@ -14,8 +14,6 @@
 
 public final class StringLib {
 
-	public static final String NAME = "String";
-
 	public static final LuanFunction LOADER = new LuanFunction() {
 		@Override public Object call(LuanState luan,Object[] args) {
 			luan.addMetatableGetter(mg);
--- a/src/luan/lib/TableLib.java	Fri Jun 13 16:37:49 2014 +0000
+++ b/src/luan/lib/TableLib.java	Fri Jun 13 17:05:31 2014 +0000
@@ -16,8 +16,6 @@
 
 public final class TableLib {
 
-	public static final String NAME = "Table";
-
 	public static final LuanFunction LOADER = new LuanFunction() {
 		@Override public Object call(LuanState luan,Object[] args) {
 			LuanTable module = new LuanTable();
--- a/src/luan/lib/ThreadLib.java	Fri Jun 13 16:37:49 2014 +0000
+++ b/src/luan/lib/ThreadLib.java	Fri Jun 13 17:05:31 2014 +0000
@@ -12,8 +12,6 @@
 
 public final class ThreadLib {
 
-	public static final String NAME = "Thread";
-
 	public static final LuanFunction LOADER = new LuanFunction() {
 		@Override public Object call(LuanState luan,Object[] args) {
 			LuanTable module = new LuanTable();