aboutsummaryrefslogtreecommitdiff
path: root/src/util.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-11-28 18:55:55 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-11-28 19:09:33 -0700
commit2402ec5d9f568643775df42c2b977455fc1f66d0 (patch)
treed4ecf410654110d620b9db5ba41cd60067eedcbf /src/util.lisp
parentb16512b1803e65a987967d407285d2af37a159e3 (diff)
downloadconsfigurator-2402ec5d9f568643775df42c2b977455fc1f66d0.tar.gz
define +ALPHANUM+ at compile time too
Necessary because we use #.(length +alphanum+) later in the file. Reported-by: Yehouda Harpaz <yeh@lispworks.com> Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/util.lisp')
-rw-r--r--src/util.lisp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/util.lisp b/src/util.lisp
index 9f0a463..f0ca5cb 100644
--- a/src/util.lisp
+++ b/src/util.lisp
@@ -371,9 +371,10 @@ expansion as a starting point for your own DEFPACKAGE form for your consfig."
(car args))
:int))
-(define-constant +alphanum+
- "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
- :test #'string=)
+(eval-when (:compile-toplevel :load-toplevel :execute)
+ (define-constant +alphanum+
+ "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
+ :test #'string=))
(defun random-alphanumeric (length)
"Return a random alphanumeric string of length LENGTH."