summaryrefslogtreecommitdiff
path: root/src/perl/ui/UI.xs
diff options
context:
space:
mode:
Diffstat (limited to 'src/perl/ui/UI.xs')
-rw-r--r--src/perl/ui/UI.xs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/perl/ui/UI.xs b/src/perl/ui/UI.xs
index fc11c7ba..2e9dbeac 100644
--- a/src/perl/ui/UI.xs
+++ b/src/perl/ui/UI.xs
@@ -104,6 +104,12 @@ static PLAIN_OBJECT_INIT_REC fe_plains[] = {
{ NULL, NULL }
};
+static void sig_deinit(void)
+{
+ signal_remove("script destroy", (SIGNAL_FUNC) sig_script_destroy);
+ signal_remove("perl scripts deinit", (SIGNAL_FUNC) sig_deinit);
+}
+
MODULE = Irssi::UI PACKAGE = Irssi::UI
PROTOTYPES: ENABLE
@@ -114,11 +120,13 @@ PREINIT:
static int initialized = FALSE;
CODE:
if (initialized) return;
+ perl_api_version_check("Irssi::UI");
initialized = TRUE;
irssi_add_plains(fe_plains);
signal_add("script destroy", (SIGNAL_FUNC) sig_script_destroy);
+ signal_add("perl scripts deinit", (SIGNAL_FUNC) sig_deinit);
INCLUDE: Themes.xs