mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-13 21:02:47 -08:00
MAKE-STRING-INPUT-STREAM accepted as start NIL, which is not valid.
This commit is contained in:
parent
3f0cda1ee3
commit
89db75f763
2 changed files with 2 additions and 3 deletions
|
|
@ -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)))
|
||||
@)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue