mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-08 05:27:35 +02:00
Adding type check to get-output-string.
This commit is contained in:
parent
a3a570042b
commit
dfe3440e91
1 changed files with 3 additions and 1 deletions
4
sexp.c
4
sexp.c
|
@ -1221,7 +1221,9 @@ sexp sexp_make_output_string_port_op (sexp ctx, sexp self, sexp_sint_t n) {
|
||||||
}
|
}
|
||||||
|
|
||||||
sexp sexp_get_output_string_op (sexp ctx, sexp self, sexp_sint_t n, sexp port) {
|
sexp sexp_get_output_string_op (sexp ctx, sexp self, sexp_sint_t n, sexp port) {
|
||||||
sexp cookie = sexp_port_cookie(port);
|
sexp cookie;
|
||||||
|
sexp_assert_type(ctx, sexp_oportp, SEXP_OPORT, port);
|
||||||
|
cookie = sexp_port_cookie(port);
|
||||||
fflush(sexp_port_stream(port));
|
fflush(sexp_port_stream(port));
|
||||||
return sexp_substring(ctx,
|
return sexp_substring(ctx,
|
||||||
sexp_stream_buf(cookie),
|
sexp_stream_buf(cookie),
|
||||||
|
|
Loading…
Add table
Reference in a new issue