diff src/luan/lib/PickleCon.java @ 130:0594c132888b

cleanup git-svn-id: https://luan-java.googlecode.com/svn/trunk@131 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Tue, 10 Jun 2014 02:43:40 +0000
parents 486a0641bca4
children 0517a4a7fcc5
line wrap: on
line diff
--- a/src/luan/lib/PickleCon.java	Mon Jun 09 09:16:16 2014 +0000
+++ b/src/luan/lib/PickleCon.java	Tue Jun 10 02:43:40 2014 +0000
@@ -49,7 +49,7 @@
 		while( i < size ) {
 			int n = in.read(a,i,size-i);
 			if( n == -1 )
-				throw luan.JAVA.exception( "end of stream" );
+				throw luan.exception( "end of stream" );
 			i += n;
 		}
 		return a;
@@ -59,7 +59,7 @@
 		ioModule.put("_read_binary",_read_binary);
 		src = in.readUTF();
 		LuanFunction fn = BasicLib.load(luan,src,"pickle-reader",true,false);
-		Object rtn = luan.JAVA.call(fn,null);
+		Object rtn = luan.call(fn);
 		ioModule.put("_binaries",null);
 		return rtn;
 	}
@@ -78,7 +78,7 @@
 			binaries.add(a);
 			return "Io._binaries[" + binaries.size() + "]";
 		}
-		throw luan.JAVA.exception( "invalid type: " + obj.getClass() );
+		throw luan.exception( "invalid type: " + obj.getClass() );
 	}
 
 	private String pickle(Object obj,Set<LuanTable> set) throws LuanException {
@@ -87,7 +87,7 @@
 
 	private String pickle(LuanTable tbl,Set<LuanTable> set) throws LuanException {
 		if( !set.add(tbl) ) {
-			throw luan.JAVA.exception( "circular reference in table" );
+			throw luan.exception( "circular reference in table" );
 		}
 		StringBuilder sb = new StringBuilder();
 		sb.append( "{" );
@@ -111,7 +111,7 @@
 			}
 		}
 		for( Object obj : args ) {
-			sb.append( luan.JAVA.toString(obj) );
+			sb.append( luan.toString(obj) );
 		}
 		out.writeUTF( sb.toString() );
 		for( byte[] a : binaries ) {