From fe90f3d4e46b2899c6e21425f3eb4fb4576a156b Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Mon, 29 May 2006 22:36:29 +0000 Subject: [PATCH] Fixed crash with "register" function in plugin scripts (bug #16701) --- ChangeLog | 3 ++- src/plugins/scripts/lua/weechat-lua.c | 2 ++ src/plugins/scripts/perl/weechat-perl.c | 2 ++ src/plugins/scripts/python/weechat-python.c | 2 ++ src/plugins/scripts/ruby/weechat-ruby.c | 2 ++ weechat/ChangeLog | 3 ++- weechat/src/plugins/scripts/lua/weechat-lua.c | 2 ++ weechat/src/plugins/scripts/perl/weechat-perl.c | 2 ++ weechat/src/plugins/scripts/python/weechat-python.c | 2 ++ weechat/src/plugins/scripts/ruby/weechat-ruby.c | 2 ++ 10 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5519efeed..42bc19781 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,10 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2006-05-25 +ChangeLog - 2006-05-30 Version 0.2.0 (under dev!): + * fixed crash with "register" function in plugin scripts (bug #16701) * fixed random crash at exit (/quit or /upgrade) with splited windows Version 0.1.9 (2006-05-25): diff --git a/src/plugins/scripts/lua/weechat-lua.c b/src/plugins/scripts/lua/weechat-lua.c index 56a2a685b..550b32179 100644 --- a/src/plugins/scripts/lua/weechat-lua.c +++ b/src/plugins/scripts/lua/weechat-lua.c @@ -149,6 +149,8 @@ weechat_lua_register (lua_State *L) /* make gcc happy */ (void) L; + + lua_current_script = NULL; name = NULL; version = NULL; diff --git a/src/plugins/scripts/perl/weechat-perl.c b/src/plugins/scripts/perl/weechat-perl.c index 869811368..d8cb85e14 100644 --- a/src/plugins/scripts/perl/weechat-perl.c +++ b/src/plugins/scripts/perl/weechat-perl.c @@ -247,6 +247,8 @@ static XS (XS_weechat_register) /* make gcc happy */ (void) items; (void) cv; + + perl_current_script = NULL; if (items != 4) { diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/weechat-python.c index 7f36aac27..36c699778 100644 --- a/src/plugins/scripts/python/weechat-python.c +++ b/src/plugins/scripts/python/weechat-python.c @@ -172,6 +172,8 @@ weechat_python_register (PyObject *self, PyObject *args) /* make gcc happy */ (void) self; + + python_current_script = NULL; name = NULL; version = NULL; diff --git a/src/plugins/scripts/ruby/weechat-ruby.c b/src/plugins/scripts/ruby/weechat-ruby.c index 42e966806..f748b5548 100644 --- a/src/plugins/scripts/ruby/weechat-ruby.c +++ b/src/plugins/scripts/ruby/weechat-ruby.c @@ -224,6 +224,8 @@ weechat_ruby_register (VALUE class, VALUE name, VALUE version, /* make gcc happy */ (void) class; + + ruby_current_script = NULL; if (NIL_P (name) || NIL_P (version) || NIL_P (shutdown_func) || NIL_P (description)) { diff --git a/weechat/ChangeLog b/weechat/ChangeLog index 5519efeed..42bc19781 100644 --- a/weechat/ChangeLog +++ b/weechat/ChangeLog @@ -1,9 +1,10 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2006-05-25 +ChangeLog - 2006-05-30 Version 0.2.0 (under dev!): + * fixed crash with "register" function in plugin scripts (bug #16701) * fixed random crash at exit (/quit or /upgrade) with splited windows Version 0.1.9 (2006-05-25): diff --git a/weechat/src/plugins/scripts/lua/weechat-lua.c b/weechat/src/plugins/scripts/lua/weechat-lua.c index 56a2a685b..550b32179 100644 --- a/weechat/src/plugins/scripts/lua/weechat-lua.c +++ b/weechat/src/plugins/scripts/lua/weechat-lua.c @@ -149,6 +149,8 @@ weechat_lua_register (lua_State *L) /* make gcc happy */ (void) L; + + lua_current_script = NULL; name = NULL; version = NULL; diff --git a/weechat/src/plugins/scripts/perl/weechat-perl.c b/weechat/src/plugins/scripts/perl/weechat-perl.c index 869811368..d8cb85e14 100644 --- a/weechat/src/plugins/scripts/perl/weechat-perl.c +++ b/weechat/src/plugins/scripts/perl/weechat-perl.c @@ -247,6 +247,8 @@ static XS (XS_weechat_register) /* make gcc happy */ (void) items; (void) cv; + + perl_current_script = NULL; if (items != 4) { diff --git a/weechat/src/plugins/scripts/python/weechat-python.c b/weechat/src/plugins/scripts/python/weechat-python.c index 7f36aac27..36c699778 100644 --- a/weechat/src/plugins/scripts/python/weechat-python.c +++ b/weechat/src/plugins/scripts/python/weechat-python.c @@ -172,6 +172,8 @@ weechat_python_register (PyObject *self, PyObject *args) /* make gcc happy */ (void) self; + + python_current_script = NULL; name = NULL; version = NULL; diff --git a/weechat/src/plugins/scripts/ruby/weechat-ruby.c b/weechat/src/plugins/scripts/ruby/weechat-ruby.c index 42e966806..f748b5548 100644 --- a/weechat/src/plugins/scripts/ruby/weechat-ruby.c +++ b/weechat/src/plugins/scripts/ruby/weechat-ruby.c @@ -224,6 +224,8 @@ weechat_ruby_register (VALUE class, VALUE name, VALUE version, /* make gcc happy */ (void) class; + + ruby_current_script = NULL; if (NIL_P (name) || NIL_P (version) || NIL_P (shutdown_func) || NIL_P (description)) {