summaryrefslogtreecommitdiff
path: root/libguile/num2integral.i.c
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/num2integral.i.c')
-rw-r--r--libguile/num2integral.i.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libguile/num2integral.i.c b/libguile/num2integral.i.c
index e0982bac3..65afa2603 100644
--- a/libguile/num2integral.i.c
+++ b/libguile/num2integral.i.c
@@ -47,8 +47,10 @@ NUM2INTEGRAL (SCM num, unsigned long int pos, const char *s_caller)
res = new;
}
-#ifndef UNSIGNED
if (SCM_BIGSIGN (num))
+#ifdef UNSIGNED
+ scm_out_of_range (s_caller, num);
+#else
{
res = -res;
if (res <= 0)
@@ -56,6 +58,7 @@ NUM2INTEGRAL (SCM num, unsigned long int pos, const char *s_caller)
else
scm_out_of_range (s_caller, num);
}
+#endif
else
{
if (res >= 0)
@@ -63,8 +66,7 @@ NUM2INTEGRAL (SCM num, unsigned long int pos, const char *s_caller)
else
scm_out_of_range (s_caller, num);
}
-#endif
-
+
return res;
}
else if (SCM_REALP (num))