From a6d93cf432554103359e6b67d96989d5619a1f77 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sun, 30 Oct 2005 23:51:19 +0000 Subject: [PATCH] Added constants for Perl return codes --- src/plugins/scripts/perl/weechat-perl.c | 11 +++++++++++ weechat/src/plugins/scripts/perl/weechat-perl.c | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/plugins/scripts/perl/weechat-perl.c b/src/plugins/scripts/perl/weechat-perl.c index 025c849cb..d6e6b070e 100644 --- a/src/plugins/scripts/perl/weechat-perl.c +++ b/src/plugins/scripts/perl/weechat-perl.c @@ -735,8 +735,11 @@ static XS (XS_weechat_set_plugin_config) void weechat_perl_xs_init (pTHX) { + HV *stash; + newXS ("DynaLoader::boot_DynaLoader", boot_DynaLoader, __FILE__); + /* interface functions */ newXS ("weechat::register", XS_weechat_register, "weechat"); newXS ("weechat::print", XS_weechat_print, "weechat"); newXS ("weechat::print_infobar", XS_weechat_print_infobar, "weechat"); @@ -750,6 +753,14 @@ weechat_perl_xs_init (pTHX) newXS ("weechat::set_config", XS_weechat_set_config, "weechat"); newXS ("weechat::get_plugin_config", XS_weechat_get_plugin_config, "weechat"); newXS ("weechat::set_plugin_config", XS_weechat_set_plugin_config, "weechat"); + + /* interface constants */ + stash = gv_stashpv ("weechat", TRUE); + newCONSTSUB (stash, "weechat::PLUGIN_RC_KO", newSViv (PLUGIN_RC_KO)); + newCONSTSUB (stash, "weechat::PLUGIN_RC_OK", newSViv (PLUGIN_RC_OK)); + newCONSTSUB (stash, "weechat::PLUGIN_RC_OK_IGNORE_WEECHAT", newSViv (PLUGIN_RC_OK_IGNORE_WEECHAT)); + newCONSTSUB (stash, "weechat::PLUGIN_RC_OK_IGNORE_PLUGINS", newSViv (PLUGIN_RC_OK_IGNORE_PLUGINS)); + newCONSTSUB (stash, "weechat::PLUGIN_RC_OK_IGNORE_ALL", newSViv (PLUGIN_RC_OK_IGNORE_ALL)); } /* diff --git a/weechat/src/plugins/scripts/perl/weechat-perl.c b/weechat/src/plugins/scripts/perl/weechat-perl.c index 025c849cb..d6e6b070e 100644 --- a/weechat/src/plugins/scripts/perl/weechat-perl.c +++ b/weechat/src/plugins/scripts/perl/weechat-perl.c @@ -735,8 +735,11 @@ static XS (XS_weechat_set_plugin_config) void weechat_perl_xs_init (pTHX) { + HV *stash; + newXS ("DynaLoader::boot_DynaLoader", boot_DynaLoader, __FILE__); + /* interface functions */ newXS ("weechat::register", XS_weechat_register, "weechat"); newXS ("weechat::print", XS_weechat_print, "weechat"); newXS ("weechat::print_infobar", XS_weechat_print_infobar, "weechat"); @@ -750,6 +753,14 @@ weechat_perl_xs_init (pTHX) newXS ("weechat::set_config", XS_weechat_set_config, "weechat"); newXS ("weechat::get_plugin_config", XS_weechat_get_plugin_config, "weechat"); newXS ("weechat::set_plugin_config", XS_weechat_set_plugin_config, "weechat"); + + /* interface constants */ + stash = gv_stashpv ("weechat", TRUE); + newCONSTSUB (stash, "weechat::PLUGIN_RC_KO", newSViv (PLUGIN_RC_KO)); + newCONSTSUB (stash, "weechat::PLUGIN_RC_OK", newSViv (PLUGIN_RC_OK)); + newCONSTSUB (stash, "weechat::PLUGIN_RC_OK_IGNORE_WEECHAT", newSViv (PLUGIN_RC_OK_IGNORE_WEECHAT)); + newCONSTSUB (stash, "weechat::PLUGIN_RC_OK_IGNORE_PLUGINS", newSViv (PLUGIN_RC_OK_IGNORE_PLUGINS)); + newCONSTSUB (stash, "weechat::PLUGIN_RC_OK_IGNORE_ALL", newSViv (PLUGIN_RC_OK_IGNORE_ALL)); } /*