mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 05:50:26 +02:00
lock ports in write' and
display'
* libguile/print.c (scm_write, scm_display): Lock the port during `display' and `write' calls. Fixes https://savannah.gnu.org/bugs/?33996.
This commit is contained in:
parent
14dcb5ccd2
commit
215fe3a891
1 changed files with 8 additions and 0 deletions
|
@ -1294,7 +1294,11 @@ scm_write (SCM obj, SCM port)
|
|||
|
||||
SCM_ASSERT (scm_valid_oport_value_p (port), port, SCM_ARG2, s_write);
|
||||
|
||||
scm_dynwind_begin (0);
|
||||
scm_dynwind_lock_port (port);
|
||||
scm_prin1 (obj, port, 1);
|
||||
scm_dynwind_end ();
|
||||
|
||||
return SCM_UNSPECIFIED;
|
||||
}
|
||||
|
||||
|
@ -1309,7 +1313,11 @@ scm_display (SCM obj, SCM port)
|
|||
|
||||
SCM_ASSERT (scm_valid_oport_value_p (port), port, SCM_ARG2, s_display);
|
||||
|
||||
scm_dynwind_begin (0);
|
||||
scm_dynwind_lock_port (port);
|
||||
scm_prin1 (obj, port, 0);
|
||||
scm_dynwind_end ();
|
||||
|
||||
return SCM_UNSPECIFIED;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue