Skip to content
Snippets Groups Projects
Commit 5ef7b269 authored by Liam Healy's avatar Liam Healy
Browse files

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).
parent 354eb334
No related branches found
No related tags found
No related merge requests found
;; GSL errors ;; GSL errors
;; Liam Healy Sat Mar 4 2006 - 18:33 ;; 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$ ;; $Id$
(in-package :gsl) (in-package :gsl)
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
;;;; Define non-error and error C return codes ;;;; Define non-error and error C return codes
;;;;**************************************************************************** ;;;;****************************************************************************
#.(cons 'progn #.(append '(eval-when (:compile-toplevel :load-toplevel :execute))
(loop for i from (cffi:foreign-enum-value 'gsl-errorno :continue) (loop for i from (cffi:foreign-enum-value 'gsl-errorno :continue)
to (cffi:foreign-enum-value 'gsl-errorno :eof) to (cffi:foreign-enum-value 'gsl-errorno :eof)
for name = (string (cffi:foreign-enum-keyword 'gsl-errorno i)) for name = (string (cffi:foreign-enum-keyword 'gsl-errorno i))
collect collect
`(defconstant ,(intern (format nil "+~:@(~a~)+" name) :gsll) ,i))) `(defconstant ,(intern (format nil "+~:@(~a~)+" name) :gsll) ,i)))
;;;;**************************************************************************** ;;;;****************************************************************************
;;;; GSL conditions ;;;; GSL conditions
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment