Changeset 13094


Ignore:
Timestamp:
12/12/10 10:04:45 (10 years ago)
Author:
ehuelsmann
Message:

Eliminate flushes after every character in javax.scripting support.

This fixes Ant output for embedded scriptlets in Ant files.

Location:
trunk/abcl/src/org/armedbear/lisp/scripting
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngine.java

    r12749 r13094  
    2626import java.io.Reader;
    2727import java.io.StringWriter;
    28 import java.math.BigInteger;
    2928import java.util.Map;
    30 import java.util.Properties;
    3129
    3230import javax.script.*;
    3331
    3432import org.armedbear.lisp.*;
    35 import org.armedbear.lisp.scripting.util.ReaderInputStream;
    36 import org.armedbear.lisp.scripting.util.WriterOutputStream;
    3733
    3834
     
    231227
    232228    Object eval(Function evaluator, LispObject code, ScriptContext ctx) throws ScriptException {
    233   ReaderInputStream in = null;
    234   WriterOutputStream out = null;
    235229  LispObject retVal = null;
    236   try {
    237       in = new ReaderInputStream(ctx.getReader());
    238       out = new WriterOutputStream(ctx.getWriter());
    239       Stream outStream = new Stream(Symbol.SYSTEM_STREAM, out, Symbol.CHARACTER);
    240       Stream inStream  = new Stream(Symbol.SYSTEM_STREAM, in,  Symbol.CHARACTER);
     230      Stream outStream = new Stream(Symbol.SYSTEM_STREAM, ctx.getWriter());
     231      Stream inStream  = new Stream(Symbol.SYSTEM_STREAM, ctx.getReader());
    241232      retVal = evaluator.execute(makeBindings(ctx.getBindings(ScriptContext.GLOBAL_SCOPE)),
    242233               makeBindings(ctx.getBindings(ScriptContext.ENGINE_SCOPE)),
     
    244235               code, new JavaObject(ctx));
    245236      return retVal.javaInstance();
    246   } catch (IOException e) {
    247       throw new ScriptException(e);
    248   }
    249237    }
    250238 
Note: See TracChangeset for help on using the changeset viewer.