summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-10-03 21:35:21 +0200
committerAndy Wingo <wingo@pobox.com>2013-10-03 21:35:21 +0200
commitd7928d7c61f297dca574e20bb5815253e90b3a36 (patch)
treef8b4ac0103eaded5c3b61573212ab0dc5fd5fcd1
parentae07b8e70bfc53220d7017bb7edcdb6c329d5bd5 (diff)
parentd7794a9d07ba657a29f7e608c3e558c437806def (diff)
Merge remote-tracking branch 'origin/stable-2.0'
Conflicts: libguile/deprecated.h libguile/programs.c libguile/programs.h
-rw-r--r--THANKS2
-rw-r--r--doc/ref/api-i18n.texi2
-rw-r--r--doc/ref/api-procedures.texi2
-rw-r--r--libguile/numbers.c11
-rw-r--r--libguile/programs.c6
-rw-r--r--libguile/programs.h2
-rw-r--r--test-suite/tests/numbers.test8
7 files changed, 17 insertions, 16 deletions
diff --git a/THANKS b/THANKS
index 222bcfd3a..ea7c8c3cb 100644
--- a/THANKS
+++ b/THANKS
@@ -74,7 +74,7 @@ For fixes or providing information which led to a fix:
David Fang
Barry Fishman
Kevin J. Fletcher
- Josep Portella Florit
+ Josep Portella Florit
Charles Gagnon
Fu-gangqiang
Aidan Gauland
diff --git a/doc/ref/api-i18n.texi b/doc/ref/api-i18n.texi
index 97474a2ff..fa3fe99d0 100644
--- a/doc/ref/api-i18n.texi
+++ b/doc/ref/api-i18n.texi
@@ -88,7 +88,7 @@ default @code{C} locale which usually represents conventions in use in
the USA):
@example
-(make-locale (list LC_MESSAGE LC_CTYPE) "sv_SE")
+(make-locale (list LC_MESSAGES LC_CTYPE) "sv_SE")
@end example
The following example combines the use of Esperanto messages and
diff --git a/doc/ref/api-procedures.texi b/doc/ref/api-procedures.texi
index e11479dc2..7fedadffd 100644
--- a/doc/ref/api-procedures.texi
+++ b/doc/ref/api-procedures.texi
@@ -297,7 +297,7 @@ list, or @code{#f} if this information is not available.
For example:
@example
-(program-lambda-alist
+(program-lambda-list
(lambda* (a b #:optional c #:key (d 1) #:rest e)
#t)) @result{}
@end example
diff --git a/libguile/numbers.c b/libguile/numbers.c
index 7ccbeecf3..b91f4c308 100644
--- a/libguile/numbers.c
+++ b/libguile/numbers.c
@@ -4977,11 +4977,14 @@ left_shift_exact_integer (SCM n, long count)
{
scm_t_inum nn = SCM_I_INUM (n);
- /* Left shift of count >= SCM_I_FIXNUM_BIT-1 will always
+ /* Left shift of count >= SCM_I_FIXNUM_BIT-1 will almost[*] always
overflow a non-zero fixnum. For smaller shifts we check the
bits going into positions above SCM_I_FIXNUM_BIT-1. If they're
all 0s for nn>=0, or all 1s for nn<0 then there's no overflow.
- Those bits are "nn >> (SCM_I_FIXNUM_BIT-1 - count)". */
+ Those bits are "nn >> (SCM_I_FIXNUM_BIT-1 - count)".
+
+ [*] There's one exception:
+ (-1) << SCM_I_FIXNUM_BIT-1 == SCM_MOST_NEGATIVE_FIXNUM */
if (nn == 0)
return n;
@@ -4994,8 +4997,8 @@ left_shift_exact_integer (SCM n, long count)
SCM result = scm_i_inum2big (nn);
mpz_mul_2exp (SCM_I_BIG_MPZ (result), SCM_I_BIG_MPZ (result),
count);
- return result;
- }
+ return scm_i_normbig (result);
+ }
}
else if (SCM_BIGP (n))
{
diff --git a/libguile/programs.c b/libguile/programs.c
index 9b3e74834..37130d0c0 100644
--- a/libguile/programs.c
+++ b/libguile/programs.c
@@ -392,12 +392,6 @@ SCM_DEFINE (scm_program_source, "program-source", 2, 1, 0,
}
#undef FUNC_NAME
-extern SCM
-scm_c_program_source (SCM program, size_t ip)
-{
- return program_source (program, ip, scm_program_sources (program));
-}
-
SCM_DEFINE (scm_program_num_free_variables, "program-num-free-variables", 1, 0, 0,
(SCM program),
"")
diff --git a/libguile/programs.h b/libguile/programs.h
index e42a76e41..275570cd1 100644
--- a/libguile/programs.h
+++ b/libguile/programs.h
@@ -89,8 +89,6 @@ SCM_API SCM scm_program_free_variable_ref (SCM program, SCM i);
SCM_API SCM scm_program_free_variable_set_x (SCM program, SCM i, SCM x);
SCM_API SCM scm_program_objcode (SCM program);
-SCM_API SCM scm_c_program_source (SCM program, size_t ip);
-
SCM_INTERNAL SCM scm_i_program_properties (SCM program);
SCM_INTERNAL int scm_i_program_arity (SCM program, int *req, int *opt, int *rest);
SCM_INTERNAL void scm_i_program_print (SCM program, SCM port,
diff --git a/test-suite/tests/numbers.test b/test-suite/tests/numbers.test
index 68f8f91a7..16f06bf83 100644
--- a/test-suite/tests/numbers.test
+++ b/test-suite/tests/numbers.test
@@ -5360,7 +5360,13 @@
(for-each (lambda (n)
(for-each (lambda (count) (test n count))
- '(-1000 -3 -2 -1 0 1 2 3 1000)))
+ `(-1000
+ ,(- fixnum-bit)
+ ,(- (- fixnum-bit 1))
+ -3 -2 -1 0 1 2 3
+ ,(- fixnum-bit 1)
+ ,fixnum-bit
+ 1000)))
(list 0 1 3 23 -1 -3 -23
fixnum-max
(1+ fixnum-max)