diff options
author | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2016-07-12 16:11:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-12 16:11:41 +0200 |
commit | 4be256fcf0723610e30ff30694736d2e1dec9b70 (patch) | |
tree | b6b599f0bd1398cc3fa169abe002c66c65bb4e80 | |
parent | 7cf9326cad623804bba0c794ec065191c7fe0ba1 (diff) | |
parent | 9559a8ead9048433783a453ca47c63514a39b205 (diff) | |
download | irssi-4be256fcf0723610e30ff30694736d2e1dec9b70.zip |
Merge pull request #512 from LemonBoy/coderef
Allow Irssi::signal_remove to work properly with coderefs
-rw-r--r-- | src/perl/perl-signals.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/perl/perl-signals.c b/src/perl/perl-signals.c index 007f7ad5..8f993660 100644 --- a/src/perl/perl-signals.c +++ b/src/perl/perl-signals.c @@ -433,8 +433,9 @@ static void perl_signal_remove_list_one(GSList **siglist, PERL_SIGNAL_REC *rec) } #define sv_func_cmp(f1, f2) \ - (f1 == f2 || (SvPOK(f1) && SvPOK(f2) && \ - g_strcmp0(SvPV_nolen(f1), SvPV_nolen(f2)) == 0)) + ((SvROK(f1) && SvROK(f2) && SvRV(f1) == SvRV(f2)) || \ + (SvPOK(f1) && SvPOK(f2) && \ + g_strcmp0(SvPV_nolen(f1), SvPV_nolen(f2)) == 0)) static void perl_signal_remove_list(GSList **list, SV *func) { |