diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-11-05 12:36:17 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-11-05 12:36:17 +0100 |
commit | bffe879db8a6f53d7f74acbed4c162cab1bca409 (patch) | |
tree | 9aece89219d2ae00ab0fffae00db567fc4edbc5a /src/plugins/scripts/perl/weechat-perl.c | |
parent | bc0237cd0df9a0aafceb312df5dc29e8c4ff2abf (diff) | |
download | weechat-bffe879db8a6f53d7f74acbed4c162cab1bca409.zip |
Fix crash in weechat_perl_exec() after unloading a Perl script
Diffstat (limited to 'src/plugins/scripts/perl/weechat-perl.c')
-rw-r--r-- | src/plugins/scripts/perl/weechat-perl.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/plugins/scripts/perl/weechat-perl.c b/src/plugins/scripts/perl/weechat-perl.c index 67df60742..6af4cfafc 100644 --- a/src/plugins/scripts/perl/weechat-perl.c +++ b/src/plugins/scripts/perl/weechat-perl.c @@ -117,7 +117,8 @@ weechat_perl_exec (struct t_plugin_script *script, void *ret_value; int *ret_i, mem_err, length; SV *ret_s; - struct t_plugin_script *old_perl_current_script; + + perl_current_script = script; /* this code is placed here to conform ISO C90 */ dSP; @@ -138,12 +139,6 @@ weechat_perl_exec (struct t_plugin_script *script, SAVETMPS; PUSHMARK(sp); - old_perl_current_script = perl_current_script; - - /* are we loading the script file ? */ - if (strcmp (function, "weechat_perl_load_eval_file") != 0) - perl_current_script = script; - count = perl_call_argv (func, G_EVAL | G_SCALAR, argv); ret_value = NULL; mem_err = 1; @@ -213,15 +208,6 @@ weechat_perl_exec (struct t_plugin_script *script, weechat_prefix ("error"), PERL_PLUGIN_NAME, function); return NULL; } - - if (strcmp (function, "weechat_perl_load_eval_file") != 0) - { - perl_current_script = old_perl_current_script; -#ifdef MULTIPLICITY - if (perl_current_script) - PERL_SET_CONTEXT (perl_current_script->interpreter); -#endif - } return ret_value; } |