From b43d88b7230ea7bd51d0d5cc9468586c045ac7f6 Mon Sep 17 00:00:00 2001 From: lhealy <lhealy@af03a46b-e846-0410-96e5-d5653c316fd0> Date: Tue, 4 Mar 2008 03:17:18 +0000 Subject: [PATCH] Error handler is re-established in saved image in SBCL by using sb-ext:*init-hooks*; fixes bug #3? git-svn-id: svn+ssh://common-lisp.net/project/gsll/svn/trunk@30 af03a46b-e846-0410-96e5-d5653c316fd0 --- init/conditions.lisp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/init/conditions.lisp b/init/conditions.lisp index c791310a..b92013ea 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: <2008-02-19 22:20:37EST conditions.lisp> +;; Time-stamp: <2008-03-03 22:06:11EST conditions.lisp> ;; $Id$ (in-package :gsl) @@ -92,10 +92,17 @@ :gsl-source-file file :gsl-line-number line)) -(cffi:foreign-funcall - "gsl_set_error_handler" - :pointer (cffi:callback gsl-error)) +(defun establish-handler () + (cffi:foreign-funcall + "gsl_set_error_handler" + :pointer (cffi:callback gsl-error))) +(establish-handler) + +;;; This insures that conditions will be signalled if GSLL is dumped +;;; in save-lisp-and-die. +#+sbcl +(push #'establish-handler sb-ext:*init-hooks*) (defmacro gsl-errorno-sm (keyword) `(define-symbol-macro -- GitLab