mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
inc fileno count on sexp_make_input_port (issue #690)
This commit is contained in:
parent
5860a65368
commit
9793fa0edf
1 changed files with 3 additions and 1 deletions
4
sexp.c
4
sexp.c
|
@ -1906,8 +1906,10 @@ sexp sexp_make_input_port (sexp ctx, FILE* in, sexp name) {
|
|||
/* here to avoid gc timing issues */
|
||||
if (in && fileno(in) >= 0) {
|
||||
sexp_port_fd(p) = sexp_lookup_fileno(ctx, fileno(in));
|
||||
if (sexp_filenop(sexp_port_fd(p)))
|
||||
if (sexp_filenop(sexp_port_fd(p))) {
|
||||
sexp_fileno_openp(sexp_port_fd(p)) = 1;
|
||||
++sexp_fileno_count(sexp_port_fd(p));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
sexp_port_cookie(p) = SEXP_VOID;
|
||||
|
|
Loading…
Add table
Reference in a new issue