diff options
author | Timo Sirainen <cras@irssi.org> | 2002-04-16 18:11:06 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-04-16 18:11:06 +0000 |
commit | c7320514aaf0e97b4a628fec301fd9c4d1fe2a7d (patch) | |
tree | e4f1ce9ef5c73ada83ddf414e4ceaf35c1dd4d93 /src/perl/common | |
parent | c5b852ed57a8a54b5981c04492f6823c98304e74 (diff) | |
download | irssi-c7320514aaf0e97b4a628fec301fd9c4d1fe2a7d.zip |
fixes for new signaling code.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2691 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/common')
-rw-r--r-- | src/perl/common/Core.xs | 25 |
1 files changed, 19 insertions, 6 deletions
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) |