X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/clg/blobdiff_plain/7f9118925679ced1c3886a75e6cced2f145ea8b2..a610e323ee77e81c6e6edefd08107a9935e207e8:/glib/gerror.lisp diff --git a/glib/gerror.lisp b/glib/gerror.lisp index 325f3bd..758752d 100644 --- 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. -;; $Id: gerror.lisp,v 1.6 2006/04/25 22:01:12 espen Exp $ +;; $Id: gerror.lisp,v 1.10 2008/04/11 20:35:48 espen Exp $ (in-package "GLIB") @@ -30,8 +30,8 @@ (defclass gerror (struct) (code :allocation :alien :type int :reader gerror-code) (message :allocation :alien :type string :reader gerror-message)) (:metaclass struct-class) - (:ref gerror-copy) - (:unref gerror-free)) + (:ref %gerror-copy) + (:unref %gerror-free)) (defbinding (%gerror-copy "g_error_copy") () pointer (location pointer)) @@ -40,7 +40,7 @@ (defbinding (%gerror-free "g_error_free") () nil (location pointer)) (define-condition glib-error (error) - ((code :initarg :domain :reader gerror-code) + ((code :initarg :code :reader gerror-code) (message :initarg :message :reader gerror-message)) (:report (lambda (condition stream) (write-string (gerror-message condition) stream)))) @@ -60,6 +60,10 @@ (defun signal-gerror (gerror) (deftype gerror-signal () 'gerror) +(define-type-method return-type ((type gerror-signal)) + (declare (ignore type)) + '(or null gerror)) + (define-type-method from-alien-form ((type gerror-signal) gerror &key (ref :free)) (declare (ignore type)) `(let ((gerror ,(from-alien-form 'gerror gerror :ref ref))) @@ -100,6 +104,9 @@ (define-condition critical-log-level (log-level) (define-condition warning-log-level (log-level) ()) +(define-condition message-log-level (log-level) + ()) + (define-condition info-log-level (log-level) ())