From 89db75f76342e38cb1bb2c652a8065a4d0773510 Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Thu, 29 Apr 2010 23:37:07 +0200 Subject: [PATCH] MAKE-STRING-INPUT-STREAM accepted as start NIL, which is not valid. --- src/c/file.d | 3 +-- src/lsp/iolib.lsp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/c/file.d b/src/c/file.d index 28fc9baf8..fe20a6c70 100755 --- a/src/c/file.d +++ b/src/c/file.d @@ -1646,11 +1646,10 @@ ecl_make_string_input_stream(cl_object strng, cl_index istart, cl_index iend) return strm; } -@(defun make_string_input_stream (strng &o istart iend) +@(defun make_string_input_stream (strng &o (istart MAKE_FIXNUM(0)) iend) cl_index_pair p; @ strng = cl_string(strng); - if (Null(istart)) istart = MAKE_FIXNUM(0); p = ecl_vector_start_end(@[make-string-input-stream], strng, istart, iend); @(return (ecl_make_string_input_stream(strng, p.start, p.end))) @) diff --git a/src/lsp/iolib.lsp b/src/lsp/iolib.lsp index 4c44d8e72..36c9e6e1f 100644 --- a/src/lsp/iolib.lsp +++ b/src/lsp/iolib.lsp @@ -25,7 +25,7 @@ automatically closed on exit." (PROGN ,@b) (CLOSE ,var))))) -(defmacro with-input-from-string ((var string &key index start end) &rest body) +(defmacro with-input-from-string ((var string &key index (start 0) end) &rest body) "Syntax: (with-input-from-string (var string-form {keyword value}*) {decl}* {form}*) Evaluates FORMs with VAR bound to a string input stream from the string that