[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH]: gobject: also loop args after #:gsignal. Fixes multiple sig
From: |
Mark H Weaver |
Subject: |
Re: [PATCH]: gobject: also loop args after #:gsignal. Fixes multiple signals per class. |
Date: |
Tue, 09 Apr 2013 01:51:15 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Hi Jan,
Jan Nieuwenhuizen <address@hidden> writes:
> I suggest these patches. Until then, I'm using inheritance and define
> one signal per class.
[...]
> diff --git a/glib/gnome/gobject/gobject.scm b/glib/gnome/gobject/gobject.scm
> index 3e5f07d..ad6abed 100644
> --- a/glib/gnome/gobject/gobject.scm
> +++ b/glib/gnome/gobject/gobject.scm
> @@ -131,7 +131,7 @@
> (define (install-signals!)
> ;; We parse a #:gsignal initialization argument to install signals.
> (let loop ((args initargs))
> - (if (not (null? args))
> + (when (not (null? args))
> (if (eq? (car args) #:gsignal)
> (let ((signal (cadr args)))
> (if (not (and (list? signal) (>= (length signal) 2)))
> @@ -142,8 +142,8 @@
> (generic (gtype-class-create-signal class name
> return-type param-types)))
> ;; Some magic to define the generic
> (module-define! (current-module)
> - (generic-function-name generic) generic)))
> - (loop (cddr args))))))
> + (generic-function-name generic) generic))))
> + (loop (cddr args)))))
Looks good to me. I just pushed a similar patch to guile-gnome git.
However, I avoided 'when' because we are still supporting Guile 1.8.x.
Thanks!
Mark