From 5ef7b2694d2573189c58c06a45dfbe593bdb388b Mon Sep 17 00:00:00 2001 From: Liam Healy <liam@thinkpad.local> Date: Mon, 15 Jun 2009 21:55:21 -0400 Subject: [PATCH] Constants defined for conditions with eval-when The constants used for GSL conditions (+EDOM+ etc.) are defined inside an eval-when so that implementations like CLISP that don't evaluate at compile time will still be able to use the constants in the following parts of the file. This now compiles in CLISP (as well as SBCL and CCL). --- init/conditions.lisp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/init/conditions.lisp b/init/conditions.lisp index 58febfcc..a9469e29 100644 --- a/init/conditions.lisp +++ b/init/conditions.lisp @@ -1,6 +1,6 @@ ;; GSL errors ;; Liam Healy Sat Mar 4 2006 - 18:33 -;; Time-stamp: <2009-05-25 14:52:25EDT conditions.lisp> +;; Time-stamp: <2009-06-15 21:46:41EDT conditions.lisp> ;; $Id$ (in-package :gsl) @@ -9,12 +9,12 @@ ;;;; Define non-error and error C return codes ;;;;**************************************************************************** -#.(cons 'progn - (loop for i from (cffi:foreign-enum-value 'gsl-errorno :continue) - to (cffi:foreign-enum-value 'gsl-errorno :eof) - for name = (string (cffi:foreign-enum-keyword 'gsl-errorno i)) - collect - `(defconstant ,(intern (format nil "+~:@(~a~)+" name) :gsll) ,i))) +#.(append '(eval-when (:compile-toplevel :load-toplevel :execute)) + (loop for i from (cffi:foreign-enum-value 'gsl-errorno :continue) + to (cffi:foreign-enum-value 'gsl-errorno :eof) + for name = (string (cffi:foreign-enum-keyword 'gsl-errorno i)) + collect + `(defconstant ,(intern (format nil "+~:@(~a~)+" name) :gsll) ,i))) ;;;;**************************************************************************** ;;;; GSL conditions -- GitLab