summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libguile/ChangeLog5
-rw-r--r--libguile/unif.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog
index 082272c4d..672d25918 100644
--- a/libguile/ChangeLog
+++ b/libguile/ChangeLog
@@ -1,5 +1,10 @@
2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
+ * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
+ SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
+
+2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
+
* numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
(SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
diff --git a/libguile/unif.c b/libguile/unif.c
index 8b77b4a1e..7fc950f20 100644
--- a/libguile/unif.c
+++ b/libguile/unif.c
@@ -1184,21 +1184,21 @@ scm_cvref (SCM v, unsigned long pos, SCM last)
return scm_long_long2num (((long long *) SCM_CELL_WORD_1 (v))[pos]);
#endif
case scm_tc7_fvect:
- if (SCM_NIMP (last) && !SCM_EQ_P (last, scm_flo0) && SCM_SLOPPY_REALP (last))
+ if (SCM_REALP (last) && !SCM_EQ_P (last, scm_flo0))
{
SCM_REAL_VALUE (last) = ((float *) SCM_CELL_WORD_1 (v))[pos];
return last;
}
return scm_make_real (((float *) SCM_CELL_WORD_1 (v))[pos]);
case scm_tc7_dvect:
- if (SCM_NIMP (last) && !SCM_EQ_P (last, scm_flo0) && SCM_SLOPPY_REALP (last))
+ if (SCM_REALP (last) && !SCM_EQ_P (last, scm_flo0))
{
SCM_REAL_VALUE (last) = ((double *) SCM_CELL_WORD_1 (v))[pos];
return last;
}
return scm_make_real (((double *) SCM_CELL_WORD_1 (v))[pos]);
case scm_tc7_cvect:
- if (SCM_NIMP (last) && SCM_SLOPPY_COMPLEXP (last))
+ if (SCM_COMPLEXP (last))
{
SCM_COMPLEX_REAL (last) = ((double *) SCM_CELL_WORD_1 (v))[2 * pos];
SCM_COMPLEX_IMAG (last) = ((double *) SCM_CELL_WORD_1 (v))[2 * pos + 1];