summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWouter Coekaerts <coekie@irssi.org>2005-03-07 15:37:31 +0000
committercoekie <coekie@dbcabf3a-b0e7-0310-adc4-f8d773084564>2005-03-07 15:37:31 +0000
commit9124723ce13cfd0983d8ccfdae1219b0e145f2dc (patch)
tree32a31b7b5e08d7b92c7a574ead80ade381c93eab /src
parentbfb951d3bed0c7f6ee20fb1be61184aeaf4bea6c (diff)
downloadirssi-9124723ce13cfd0983d8ccfdae1219b0e145f2dc.zip
Fix /script reset, which caused crashes (Bug 48)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3721 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/perl/common/Irssi.xs1
-rw-r--r--src/perl/irc/Irc.xs4
-rw-r--r--src/perl/textui/TextUI.xs1
-rw-r--r--src/perl/ui/UI.xs1
4 files changed, 6 insertions, 1 deletions
diff --git a/src/perl/common/Irssi.xs b/src/perl/common/Irssi.xs
index d0e82425..9f33d557 100644
--- a/src/perl/common/Irssi.xs
+++ b/src/perl/common/Irssi.xs
@@ -28,6 +28,7 @@ CODE:
if (!initialized) return;
perl_expando_deinit();
perl_settings_deinit();
+ initialized = FALSE;
BOOT:
irssi_boot(Channel);
diff --git a/src/perl/irc/Irc.xs b/src/perl/irc/Irc.xs
index 3ccce9aa..ed472680 100644
--- a/src/perl/irc/Irc.xs
+++ b/src/perl/irc/Irc.xs
@@ -1,5 +1,7 @@
#include "module.h"
+static int initialized = FALSE;
+
static void perl_irc_connect_fill_hash(HV *hv, IRC_SERVER_CONNECT_REC *conn)
{
perl_connect_fill_hash(hv, (SERVER_CONNECT_REC *) conn);
@@ -161,7 +163,6 @@ PROTOTYPES: ENABLE
void
init()
PREINIT:
- static int initialized = FALSE;
int chat_type;
CODE:
if (initialized) return;
@@ -198,6 +199,7 @@ CODE:
void
deinit()
CODE:
+ initialized = FALSE;
BOOT:
irssi_boot(Irc__Channel);
diff --git a/src/perl/textui/TextUI.xs b/src/perl/textui/TextUI.xs
index 4f23a9a0..a958e202 100644
--- a/src/perl/textui/TextUI.xs
+++ b/src/perl/textui/TextUI.xs
@@ -107,6 +107,7 @@ deinit()
CODE:
if (!initialized) return;
perl_statusbar_deinit();
+ initialized = FALSE;
MODULE = Irssi::TextUI PACKAGE = Irssi
diff --git a/src/perl/ui/UI.xs b/src/perl/ui/UI.xs
index 670fb1a5..d8c7f7ae 100644
--- a/src/perl/ui/UI.xs
+++ b/src/perl/ui/UI.xs
@@ -100,6 +100,7 @@ deinit()
CODE:
if (!initialized) return;
perl_themes_deinit();
+ initialized = FALSE;
BOOT:
irssi_boot(UI__Formats);