diff options
author | Timo Sirainen <cras@irssi.org> | 2001-10-20 13:19:25 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-10-20 13:19:25 +0000 |
commit | a5b32b70a7db8ce41a37d9ee6fdef85300130351 (patch) | |
tree | e02a223f3a9fe2e84148a7de6cc282560476f14a /src/perl/ui | |
parent | 476b5ec863c49bb9a85eda23fbba31cf0d3a443c (diff) | |
download | irssi-a5b32b70a7db8ce41a37d9ee6fdef85300130351.zip |
Added API version check between perl module and perl libs.
perl_scripts_deinit() now destroys all dynamically loaded libraries (Irssi,
Irssi::Irc, Irssi::UI too) so /UNLOAD perl should now release more memory,
this also makes /unload perl, /load perl work again.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1859 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/ui')
-rw-r--r-- | src/perl/ui/UI.pm | 2 | ||||
-rw-r--r-- | src/perl/ui/UI.xs | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/perl/ui/UI.pm b/src/perl/ui/UI.pm index 226d6953..7701d178 100644 --- a/src/perl/ui/UI.pm +++ b/src/perl/ui/UI.pm @@ -7,7 +7,7 @@ package Irssi::UI; use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); -$VERSION = "0.20"; +$VERSION = "0.8"; require Exporter; require DynaLoader; 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 |