summaryrefslogtreecommitdiff
path: root/libguile/read.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-05-13 10:32:46 +0200
committerAndy Wingo <wingo@pobox.com>2011-05-13 13:48:07 +0200
commit2e16a342f226b97e47fd2cd30c367ebca2a3080c (patch)
treee0e1241a60d99b70ae854fe8922957f9977e1f7d /libguile/read.c
parent210c0325d38abc7409b34b6b4724a297c5524eb5 (diff)
downloadguile-2e16a342f226b97e47fd2cd30c367ebca2a3080c.tar.gz
fix type errors
* libguile/numbers.c (scm_logand): Fix a type error (comparing a SCM against an int, when we really wanted to compare the unpacked fixnum). * libguile/ports.c (scm_i_set_conversion_strategy_x): Check scm_conversion_strategy_init, not scm_conversion_strategy. * libguile/read.c (recsexpr): Fix loops to avoid strange test of SCM values.
Diffstat (limited to 'libguile/read.c')
-rw-r--r--libguile/read.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libguile/read.c b/libguile/read.c
index ad809ef56..3760ce135 100644
--- a/libguile/read.c
+++ b/libguile/read.c
@@ -1557,7 +1557,7 @@ recsexpr (SCM obj, long line, int column, SCM filename)
if (!scm_is_pair(obj)) {
return obj;
} else {
- SCM tmp = obj, copy;
+ SCM tmp, copy;
/* If this sexpr is visible in the read:sharp source, we want to
keep that information, so only record non-constant cons cells
which haven't previously been read by the reader. */
@@ -1567,7 +1567,7 @@ recsexpr (SCM obj, long line, int column, SCM filename)
{
copy = scm_cons (recsexpr (SCM_CAR (obj), line, column, filename),
SCM_UNDEFINED);
- while ((tmp = SCM_CDR (tmp)) && scm_is_pair (tmp))
+ for (tmp = obj; scm_is_pair (tmp); tmp = SCM_CDR (tmp))
{
SCM_SETCDR (copy, scm_cons (recsexpr (SCM_CAR (tmp),
line,
@@ -1581,7 +1581,7 @@ recsexpr (SCM obj, long line, int column, SCM filename)
else
{
recsexpr (SCM_CAR (obj), line, column, filename);
- while ((tmp = SCM_CDR (tmp)) && scm_is_pair (tmp))
+ for (tmp = obj; scm_is_pair (tmp); tmp = SCM_CDR (tmp))
recsexpr (SCM_CAR (tmp), line, column, filename);
copy = SCM_UNDEFINED;
}