summaryrefslogtreecommitdiff
path: root/src/perl/common
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-04-27 21:53:25 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-04-27 21:53:25 +0000
commitda867d4d68787c04bcd3487bdd2bf3c81ec21316 (patch)
treee20a0c7f6d7d3fb527c7cec9ee5e1211970b3e0c /src/perl/common
parent4b45f190a25b6107e662e68515c95f10ae30742e (diff)
downloadirssi-da867d4d68787c04bcd3487bdd2bf3c81ec21316.zip
added signal_continue() for continuing signal emission with new parameters.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2730 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/common')
-rw-r--r--src/perl/common/Core.xs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/perl/common/Core.xs b/src/perl/common/Core.xs
index 6889d137..0fb93efb 100644
--- a/src/perl/common/Core.xs
+++ b/src/perl/common/Core.xs
@@ -77,6 +77,25 @@ CODE:
signal_emit(signal, items-1, p[0], p[1], p[2], p[3], p[4], p[5]);
void
+signal_continue(...)
+CODE:
+ void *p[SIGNAL_MAX_ARGUMENTS];
+ int n;
+
+ memset(p, 0, sizeof(p));
+ for (n = 0; n < items && n < SIGNAL_MAX_ARGUMENTS; n++) {
+ if (SvPOKp(ST(n)))
+ p[n] = SvPV(ST(n), PL_na);
+ else if (irssi_is_ref_object(ST(n)))
+ p[n] = irssi_ref_object(ST(n));
+ else if (SvROK(ST(n)))
+ p[n] = (void *) SvIV((SV*)SvRV(ST(n)));
+ else
+ p[n] = NULL;
+ }
+ signal_continue(items, p[0], p[1], p[2], p[3], p[4], p[5]);
+
+void
signal_add(...)
CODE:
if (items != 1 && items != 2)