1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

don't take string-write mutex in read.c:read_token

* libguile/read.c (read_token): Don't take the string-write mutex when
  reading a token into a buffer, because it's assumed that the buffer is
  fresh (not seen by other threads), and a soft port can call a
  procedure that needs the string-write mutex.
This commit is contained in:
Andy Wingo 2009-12-21 22:12:31 +01:00
parent 7656f19446
commit 8b0d7b9d94

View file

@ -195,7 +195,6 @@ read_token (SCM port, SCM buf, size_t *read)
scm_t_wchar chr;
*read = 0;
buf = scm_i_string_start_writing (buf);
while (*read < scm_i_string_length (buf))
{
chr = scm_getc (port);
@ -218,7 +217,6 @@ read_token (SCM port, SCM buf, size_t *read)
scm_i_string_set_x (buf, *read, chr);
(*read)++;
}
scm_i_string_stop_writing ();
return 1;
}