diff options
author | Nei <ailin@flupps.net> | 2013-01-08 22:02:30 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2013-01-08 22:02:30 +0100 |
commit | 2ca30ed7a91704eb83ef2c44e2f583804fd23a9c (patch) | |
tree | fde5fe01c177f300c0455e1edd698324aa5a67d2 /src/plugins/perl/weechat-perl-api.c | |
parent | 7d1ad59ddea7d621840df182758c54f1e02f9daf (diff) | |
download | weechat-2ca30ed7a91704eb83ef2c44e2f583804fd23a9c.zip |
perl: fix calls to callbacks during load of script when multiplicity is disabled (bug #38044)
Diffstat (limited to 'src/plugins/perl/weechat-perl-api.c')
-rw-r--r-- | src/plugins/perl/weechat-perl-api.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/perl/weechat-perl-api.c b/src/plugins/perl/weechat-perl-api.c index a1fcbfa55..3578e9f3f 100644 --- a/src/plugins/perl/weechat-perl-api.c +++ b/src/plugins/perl/weechat-perl-api.c @@ -91,6 +91,9 @@ #define API_DEF_FUNC(__name) \ newXS ("weechat::" #__name, XS_weechat_api_##__name, "weechat"); +#ifdef NO_PERL_MULTIPLICITY +#undef MULTIPLICITY +#endif extern void boot_DynaLoader (pTHX_ CV* cv); @@ -153,6 +156,9 @@ XS (XS_weechat_api_register) description, shutdown_func, charset); if (perl_current_script) { +#ifndef MULTIPLICITY + perl_current_script->interpreter = SvPV_nolen (eval_pv ("__PACKAGE__", TRUE)); +#endif perl_registered_script = perl_current_script; if ((weechat_perl_plugin->debug >= 2) || !perl_quiet) { |