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
;; 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment