unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Jan Nieuwenhuizen <janneke@gnu.org>
Cc: guile-user <guile-user@gnu.org>,
	guile-gtk-general <guile-gtk-general@gnu.org>
Subject: Re: [PATCH]: gobject: also loop args after #:gsignal. Fixes multiple signals per class.
Date: Tue, 09 Apr 2013 01:51:15 -0400	[thread overview]
Message-ID: <8761zwdzfw.fsf@tines.lan> (raw)
In-Reply-To: <878v4yu0nu.fsf@nlvehvbe01nb29b.ddns.nl-htc01.nxp.com> (Jan Nieuwenhuizen's message of "Thu, 04 Apr 2013 11:04:37 +0200")

Hi Jan,

Jan Nieuwenhuizen <janneke@gnu.org> 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



      parent reply	other threads:[~2013-04-09  5:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-04  9:04 [PATCH]: gobject: also loop args after #:gsignal. Fixes multiple signals per class Jan Nieuwenhuizen
2013-04-04 16:54 ` David Pirotte
2013-04-09  5:51 ` Mark H Weaver [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8761zwdzfw.fsf@tines.lan \
    --to=mhw@netris.org \
    --cc=guile-gtk-general@gnu.org \
    --cc=guile-user@gnu.org \
    --cc=janneke@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).