summaryrefslogtreecommitdiff
path: root/libguile/arrays.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-11-07 23:53:06 +0100
committerAndy Wingo <wingo@pobox.com>2011-11-08 00:54:58 +0100
commitbe632904cafd0c5baf38b2ef970acc2c72af6cd3 (patch)
treee3bde19c1963a480bd33487c76c624f684953c9e /libguile/arrays.c
parent0d959103f985bbb60959c7ef4738235527792e47 (diff)
downloadguile-be632904cafd0c5baf38b2ef970acc2c72af6cd3.tar.gz
locking on scm_c_read, scm_getc
* libguile/ports.c (scm_c_read_unlocked, scm_c_read, scm_getc_unlocked) (scm_getc): Split getc and read operations into locked and unlocked variants. Change most uses to use the _unlocked version.
Diffstat (limited to 'libguile/arrays.c')
-rw-r--r--libguile/arrays.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libguile/arrays.c b/libguile/arrays.c
index cc5c72602..de221a90d 100644
--- a/libguile/arrays.c
+++ b/libguile/arrays.c
@@ -832,14 +832,14 @@ read_decimal_integer (SCM port, int c, ssize_t *resp)
if (c == '-')
{
sign = -1;
- c = scm_getc (port);
+ c = scm_getc_unlocked (port);
}
while ('0' <= c && c <= '9')
{
res = 10*res + c-'0';
got_it = 1;
- c = scm_getc (port);
+ c = scm_getc_unlocked (port);
}
if (got_it)
@@ -870,7 +870,7 @@ scm_i_read_array (SCM port, int c)
*/
if (c == 'f')
{
- c = scm_getc (port);
+ c = scm_getc_unlocked (port);
if (c != '3' && c != '6')
{
if (c != EOF)
@@ -899,7 +899,7 @@ scm_i_read_array (SCM port, int c)
&& tag_len < sizeof tag_buf / sizeof tag_buf[0])
{
tag_buf[tag_len++] = c;
- c = scm_getc (port);
+ c = scm_getc_unlocked (port);
}
if (tag_len == 0)
tag = SCM_BOOL_T;
@@ -924,7 +924,7 @@ scm_i_read_array (SCM port, int c)
if (c == '@')
{
- c = scm_getc (port);
+ c = scm_getc_unlocked (port);
c = read_decimal_integer (port, c, &lbnd);
}
@@ -932,7 +932,7 @@ scm_i_read_array (SCM port, int c)
if (c == ':')
{
- c = scm_getc (port);
+ c = scm_getc_unlocked (port);
c = read_decimal_integer (port, c, &len);
if (len < 0)
scm_i_input_error (NULL, port,