Changeset 12325


Ignore:
Timestamp:
01/01/10 22:22:13 (11 years ago)
Author:
ehuelsmann
Message:

Create API for (SETF (STREAM-EXTERNAL-FORMAT ...) ...) from the lisp world.

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
3 edited

Legend:

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

    r12306 r12325  
    473473        autoload("stream-error-stream", "StreamError");
    474474        autoload("stream-external-format", "stream_external_format");
     475        autoload("%set-stream-external-format", "stream_external_format");
    475476        autoload("stringp", "StringFunctions");
    476477        autoload("sxhash", "HashTableFunctions");
  • trunk/abcl/src/org/armedbear/lisp/setf.lisp

    r11773 r12325  
    239239
    240240(defsetf function-info %set-function-info)
     241
     242(defsetf stream-external-format %set-stream-external-format)
  • trunk/abcl/src/org/armedbear/lisp/stream_external_format.java

    r12316 r12325  
    5555    private static final Primitive STREAM_EXTERNAL_FORMAT =
    5656        new stream_external_format();
     57
     58    // DEFSETF-ed in 'setf.lisp'
     59    private static final Primitive SET_STREAM_EXTERNAL_FORMAT =
     60        new Primitive("%set-stream-external-format",
     61                      PACKAGE_SYS, false, "stream external-format") {
     62        @Override
     63        public LispObject execute(LispObject stream, LispObject format) {
     64            Stream s = checkStream(stream);
     65            s.setExternalFormat(format);
     66
     67            return format;
     68        }
     69    };
    5770}
Note: See TracChangeset for help on using the changeset viewer.