From 35f68f481cbea35889d2488c476cbc28898e82f4 Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Wed, 23 May 2012 10:01:03 +0400 Subject: [PATCH] gensym: Don't restrict numerical argument to fixnum. (gensym number) was restricted to fixnums, restrict it to unsigned-byte, as per the standard. --- src/code/symbol.lisp | 2 +- tests/symbol.pure.lisp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/code/symbol.lisp b/src/code/symbol.lisp index 6210a6d..7031776 100644 --- a/src/code/symbol.lisp +++ b/src/code/symbol.lisp @@ -274,7 +274,7 @@ distinct from the global value. Can also be SETF." (multiple-value-bind (prefix int) (etypecase thing (simple-string (values thing old)) - (fixnum (values "G" thing)) + (unsigned-byte (values "G" thing)) (string (values (coerce thing 'simple-string) old))) (declare (simple-string prefix)) (make-symbol (%make-symbol-name prefix int))))) diff --git a/tests/symbol.pure.lisp b/tests/symbol.pure.lisp index ac30c8a..f5f9440 100644 --- a/tests/symbol.pure.lisp +++ b/tests/symbol.pure.lisp @@ -25,3 +25,6 @@ (set-pprint-dispatch 'string (lambda (stream obj) (write-string "BAR-" stream))) (assert (string= "FOO-" (gentemp "FOO-") :end2 4)))) + +(with-test (:name (gensym-fixnum-restriction)) + (gensym (1+ most-positive-fixnum))) -- 1.7.10.4