[armedbear-devel] [armedbear-cvs] r13094 - in trunk/abcl/src/org/armedbear/lisp/scripting: . util
Erik Huelsmann
ehuels at gmail.com
Sun Dec 12 10:04:04 UTC 2010
Hi Alessio,
Could you review my commit below? I've removed the
ReaderInput/WriterOutput streams, because I think their functionality
is available in our general Stream class.
Thanks in advance!
Bye,
Erik.
On Sun, Dec 12, 2010 at 11:04 AM, Erik Huelsmann
<ehuelsmann at common-lisp.net> wrote:
> Author: ehuelsmann
> Date: Sun Dec 12 05:04:45 2010
> New Revision: 13094
>
> Log:
> Eliminate flushes after every character in javax.scripting support.
>
> This fixes Ant output for embedded scriptlets in Ant files.
>
> Removed:
> trunk/abcl/src/org/armedbear/lisp/scripting/util/
> Modified:
> trunk/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngine.java
>
> Modified: trunk/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngine.java
> ==============================================================================
> --- trunk/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngine.java (original)
> +++ trunk/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngine.java Sun Dec 12 05:04:45 2010
> @@ -25,15 +25,11 @@
> import java.io.InputStream;
> import java.io.Reader;
> import java.io.StringWriter;
> -import java.math.BigInteger;
> import java.util.Map;
> -import java.util.Properties;
>
> import javax.script.*;
>
> import org.armedbear.lisp.*;
> -import org.armedbear.lisp.scripting.util.ReaderInputStream;
> -import org.armedbear.lisp.scripting.util.WriterOutputStream;
>
>
> public class AbclScriptEngine extends AbstractScriptEngine implements Invocable, Compilable {
> @@ -230,22 +226,14 @@
> }
>
> Object eval(Function evaluator, LispObject code, ScriptContext ctx) throws ScriptException {
> - ReaderInputStream in = null;
> - WriterOutputStream out = null;
> LispObject retVal = null;
> - try {
> - in = new ReaderInputStream(ctx.getReader());
> - out = new WriterOutputStream(ctx.getWriter());
> - Stream outStream = new Stream(Symbol.SYSTEM_STREAM, out, Symbol.CHARACTER);
> - Stream inStream = new Stream(Symbol.SYSTEM_STREAM, in, Symbol.CHARACTER);
> + Stream outStream = new Stream(Symbol.SYSTEM_STREAM, ctx.getWriter());
> + Stream inStream = new Stream(Symbol.SYSTEM_STREAM, ctx.getReader());
> retVal = evaluator.execute(makeBindings(ctx.getBindings(ScriptContext.GLOBAL_SCOPE)),
> makeBindings(ctx.getBindings(ScriptContext.ENGINE_SCOPE)),
> inStream, outStream,
> code, new JavaObject(ctx));
> return retVal.javaInstance();
> - } catch (IOException e) {
> - throw new ScriptException(e);
> - }
> }
>
> @Override
>
> _______________________________________________
> armedbear-cvs mailing list
> armedbear-cvs at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-cvs
>
More information about the armedbear-devel
mailing list