From c7320514aaf0e97b4a628fec301fd9c4d1fe2a7d Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 16 Apr 2002 18:11:06 +0000 Subject: fixes for new signaling code. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2691 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/perl/common/Core.xs | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'src/perl/common') diff --git a/src/perl/common/Core.xs b/src/perl/common/Core.xs index 20cf32f1..d997bd58 100644 --- a/src/perl/common/Core.xs +++ b/src/perl/common/Core.xs @@ -82,9 +82,10 @@ CODE: if (items != 1 && items != 2) croak("Usage: Irssi::signal_add(signal, func)"); if (items == 2) - perl_signal_add((char *)SvPV(ST(0),PL_na), ST(1)); + perl_signal_add_full((char *)SvPV(ST(0),PL_na), ST(1), + SIGNAL_PRIORITY_DEFAULT); else - perl_signal_add_hash(1, ST(0)); + perl_signal_add_hash(SIGNAL_PRIORITY_DEFAULT, ST(0)); void signal_add_first(...) @@ -92,9 +93,10 @@ CODE: if (items != 1 && items != 2) croak("Usage: Irssi::signal_add_first(signal, func)"); if (items == 2) - perl_signal_add_first((char *)SvPV(ST(0),PL_na), ST(1)); + perl_signal_add_full((char *)SvPV(ST(0),PL_na), ST(1), + SIGNAL_PRIORITY_HIGH); else - perl_signal_add_hash(0, ST(0)); + perl_signal_add_hash(SIGNAL_PRIORITY_HIGH, ST(0)); void signal_add_last(...) @@ -102,9 +104,20 @@ CODE: if (items != 1 && items != 2) croak("Usage: Irssi::signal_add_last(signal, func)"); if (items == 2) - perl_signal_add_last((char *)SvPV(ST(0),PL_na), ST(1)); + perl_signal_add_full((char *)SvPV(ST(0),PL_na), ST(1), + SIGNAL_PRIORITY_LOW); else - perl_signal_add_hash(2, ST(0)); + perl_signal_add_hash(SIGNAL_PRIORITY_LOW, ST(0)); + +void +signal_add_priority(...) +CODE: + if (items != 2 && items != 3) + croak("Usage: Irssi::signal_add_priority(signal, func, priority)"); + if (items == 3) + perl_signal_add_full((char *)SvPV(ST(0),PL_na), ST(1), SvIV(ST(2))); + else + perl_signal_add_hash(SvIV(ST(0)), ST(1)); void signal_remove(signal, func) -- cgit v1.2.3