chiark
/
gitweb
/
~mdw
/
clg
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
74c27bb
)
Added convenient type GERROR-SIGNAL which will signal an error automatically when...
author
espen
<espen>
Mon, 13 Feb 2006 20:03:29 +0000
(20:03 +0000)
committer
espen
<espen>
Mon, 13 Feb 2006 20:03:29 +0000
(20:03 +0000)
glib/gerror.lisp
patch
|
blob
|
blame
|
history
diff --git
a/glib/gerror.lisp
b/glib/gerror.lisp
index eafd9b0252dadf777fd41ff907ec0c7c70befd84..c8cbd2351883fa969711661af37056f26fedab62 100644
(file)
--- a/
glib/gerror.lisp
+++ b/
glib/gerror.lisp
@@
-20,7
+20,7
@@
;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-;; $Id: gerror.lisp,v 1.
2 2005-04-23 16:48:50
espen Exp $
+;; $Id: gerror.lisp,v 1.
3 2006-02-13 20:03:29
espen Exp $
(in-package "GLIB")
(in-package "GLIB")
@@
-65,6
+65,15
@@
(defun signal-gerror (gerror)
(error condition :code (gerror-code gerror) :message (gerror-message gerror))))
(error condition :code (gerror-code gerror) :message (gerror-message gerror))))
+(deftype gerror-signal () 'gerror)
+
+(defmethod from-alien-form (gerror (type (eql 'gerror-signal)) &rest args)
+ (declare (ignore type args))
+ `(let ((gerror ,(from-alien-form gerror 'gerror)))
+ (when gerror
+ (signal-gerror gerror))))
+
+
;;; Message logging
(eval-when (:compile-toplevel :load-toplevel :execute)
;;; Message logging
(eval-when (:compile-toplevel :load-toplevel :execute)