From 883510a3fdd1793a148a9ab26c7621bb8e6badc4 Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Sun, 20 Feb 2022 17:33:36 +0100 Subject: [PATCH] remove deprecated defines - PERL_STATIC_LIBS (was not tested anymore) - HAVE_GMODULE (always required) - HAVE_STATIC_IRC - HAVE_STATIC_PERL - HAVE_SOCKS (was not working properly) - USE_GREGEX (we use it) --- docs/startup-HOWTO.html | 8 +-- docs/startup-HOWTO.txt | 9 +-- meson.build | 5 +- meson_options.txt | 1 - src/common.h | 4 +- src/core/iregex-regexh.c | 99 ------------------------------- src/core/iregex.h | 10 ---- src/core/meson.build | 8 +-- src/core/modules-load.c | 13 ---- src/core/modules.h | 10 +--- src/core/network.h | 12 ++-- src/fe-common/core/fe-modules.c | 21 ------- src/fe-common/irc/fe-common-irc.c | 13 ---- src/fe-common/irc/irc-modules.c | 6 -- src/fe-common/irc/meson.build | 2 - src/fe-none/irssi.c | 27 --------- src/fe-text/irssi.c | 55 ----------------- src/irc/dcc/dcc-queue.h | 4 +- src/irc/irc.c | 7 --- src/perl/irssi-core.pl | 6 +- src/perl/meson.build | 1 - src/perl/perl-core.c | 37 +----------- 22 files changed, 20 insertions(+), 338 deletions(-) delete mode 100644 src/core/iregex-regexh.c delete mode 100644 src/fe-common/irc/irc-modules.c delete mode 100644 src/irc/irc.c diff --git a/docs/startup-HOWTO.html b/docs/startup-HOWTO.html index 696dea4d..787094d0 100644 --- a/docs/startup-HOWTO.html +++ b/docs/startup-HOWTO.html @@ -515,12 +515,12 @@ Ctrl-X - set the next server in list active

SOCKS

-

Irssi can be compiled with socks support (--with-socks option to configure), which requires “dante” and routes all connections through the proxy specified in the system-wide /etc/socks.conf. This method is known to have issues in Mac OS X.

+

Using proxychains-ng is recommended for using irssi with a socks proxy.

+ +

Irssi does not support socks proxy natively.

Note that /SET proxy settings don’t have anything to do with socks.

-

Using proxychains-ng is recommended over recompiling irssi.

-

Others

IRC bouncers usually work like IRC servers, and want a password. You can give it with:

@@ -683,4 +683,4 @@ Ctrl-X - set the next server in list active /STATUSBAR <name> REMOVE <item> -

For statusbar scripts, the item name is usually equivalent to the script name. The documentation of the script ought to tell you if this is not the case. For example, to add mail.pl before the window activity item, use: /STATUSBAR window ADD -before act mail.

\ No newline at end of file +

For statusbar scripts, the item name is usually equivalent to the script name. The documentation of the script ought to tell you if this is not the case. For example, to add mail.pl before the window activity item, use: /STATUSBAR window ADD -before act mail.

diff --git a/docs/startup-HOWTO.txt b/docs/startup-HOWTO.txt index 90d278de..5cc86af3 100644 --- a/docs/startup-HOWTO.txt +++ b/docs/startup-HOWTO.txt @@ -578,15 +578,12 @@ Irssi proxy works fine with other IRC clients as well. SOCKS -Irssi can be compiled with socks support (--with-socks option to configure), -which requires “dante” and routes all connections through the proxy specified -in the system-wide /etc/socks.conf. This method is known to have issues in Mac -OS X. +Using [4]proxychains-ng is recommended for using irssi with a socks proxy. + +Irssi does not support socks proxy natively. Note that /SET proxy settings don’t have anything to do with socks. -Using [4]proxychains-ng is recommended over recompiling irssi. - Others IRC bouncers usually work like IRC servers, and want a password. You can give diff --git a/meson.build b/meson.build index f2a15ee1..f8362723 100644 --- a/meson.build +++ b/meson.build @@ -32,7 +32,6 @@ want_fuzzer = get_option('with-fuzzer') == 'yes' fuzzer_lib = get_option('with-fuzzer-lib') fuzzer_link_language = get_option('fuzzer-link-language') want_proxy = get_option('with-proxy') == 'yes' -want_gregex = get_option('disable-gregex') != 'yes' require_capsicum = get_option('with-capsicum') == 'yes' want_capsicum = get_option('with-capsicum') != 'no' @@ -519,9 +518,8 @@ conf = configuration_data() conf.set('HAVE_CAPSICUM', have_capsicum, description : 'Build with Capsicum support') conf.set('HAVE_GMODULE', true) -conf.set('HAVE_SOCKS', false, description : 'Build with socks support') conf.set('TERM_TRUECOLOR', true) -conf.set('USE_GREGEX', want_gregex, description : 'use GRegex for regular expressions') +conf.set('USE_GREGEX', true) conf.set10('_DARWIN_USE_64_BIT_INODE', true, description : 'Enable large inode numbers on Mac OS X 10.5.') conf.set_quoted('FHS_PREFIX', get_option('fhs-prefix')) @@ -626,7 +624,6 @@ if have_perl endif message('Install prefix ................... : ' + get_option('prefix')) message('') -message('Building with GRegex ............. : ' + want_gregex.to_string('yes', 'no')) message('Building with Capsicum ........... : ' + have_capsicum.to_string('yes', 'no')) message('Building with utf8proc ........... : ' + have_libutf8proc.to_string('yes', 'no')) message('Building with OTR support ........ : ' + have_otr.to_string('yes', 'no')) diff --git a/meson_options.txt b/meson_options.txt index 617de554..a5b4ffbb 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -7,7 +7,6 @@ option('with-proxy', type : 'combo', description : 'Build irssi-proxy', option('with-perl-lib', type : 'string', description : 'Specify where to install the Perl libraries for Irssi') option('with-perl', type : 'combo', description : 'Build with Perl support', choices : ['auto', 'yes', 'no']) option('with-otr', type : 'combo', description : 'Build with OTR support', choices : ['auto', 'yes', 'no']) -option('disable-gregex', type : 'combo', description : 'Build without GRegex (fall back to regex.h)', choices : ['no', 'yes']) option('disable-utf8proc', type : 'combo', description : 'Build without Julia\'s utf8proc', choices : ['auto', 'yes', 'no']) option('with-capsicum', type : 'combo', description : 'Build with Capsicum support', choices : ['auto', 'yes', 'no']) option('static-dependency', type : 'combo', description : 'Request static dependencies', choices : ['no', 'yes']) diff --git a/src/common.h b/src/common.h index ad5c88bb..d63ec3cf 100644 --- a/src/common.h +++ b/src/common.h @@ -37,9 +37,7 @@ #include #include -#ifdef HAVE_GMODULE -# include -#endif +#include typedef guint64 uoff_t; #define PRIuUOFF_T G_GUINT64_FORMAT diff --git a/src/core/iregex-regexh.c b/src/core/iregex-regexh.c deleted file mode 100644 index aae8ecdf..00000000 --- a/src/core/iregex-regexh.c +++ /dev/null @@ -1,99 +0,0 @@ -#include - -Regex * -i_regex_new (const gchar *pattern, - GRegexCompileFlags compile_options, - GRegexMatchFlags match_options, - GError **error) -{ - Regex *regex; - char *errbuf; - int cflags; - int errcode, errbuf_len; - - regex = g_new0(Regex, 1); - cflags = REG_EXTENDED; - if (compile_options & G_REGEX_CASELESS) - cflags |= REG_ICASE; - if (compile_options & G_REGEX_MULTILINE) - cflags |= REG_NEWLINE; - if (match_options & G_REGEX_MATCH_NOTBOL) - cflags |= REG_NOTBOL; - if (match_options & G_REGEX_MATCH_NOTEOL) - cflags |= REG_NOTEOL; - - errcode = regcomp(regex, pattern, cflags); - if (errcode != 0) { - errbuf_len = regerror(errcode, regex, 0, 0); - errbuf = g_malloc(errbuf_len); - regerror(errcode, regex, errbuf, errbuf_len); - g_set_error(error, G_REGEX_ERROR, errcode, "%s", errbuf); - g_free(errbuf); - g_free(regex); - return NULL; - } else { - return regex; - } -} - -void -i_regex_unref (Regex *regex) -{ - regfree(regex); - g_free(regex); -} - -gboolean -i_regex_match (const Regex *regex, - const gchar *string, - GRegexMatchFlags match_options, - MatchInfo **match_info) -{ - int groups; - int eflags; - - g_return_val_if_fail(regex != NULL, FALSE); - - if (match_info != NULL) { - groups = 1 + regex->re_nsub; - *match_info = g_new0(MatchInfo, groups); - } else { - groups = 0; - } - - eflags = 0; - if (match_options & G_REGEX_MATCH_NOTBOL) - eflags |= REG_NOTBOL; - if (match_options & G_REGEX_MATCH_NOTEOL) - eflags |= REG_NOTEOL; - - return regexec(regex, string, groups, groups ? *match_info : NULL, eflags) == 0; -} - -gboolean -i_match_info_fetch_pos (const MatchInfo *match_info, - gint match_num, - gint *start_pos, - gint *end_pos) -{ - if (start_pos != NULL) - *start_pos = match_info[match_num].rm_so; - if (end_pos != NULL) - *end_pos = match_info[match_num].rm_eo; - - return TRUE; -} - -gboolean -i_match_info_matches (const MatchInfo *match_info) -{ - g_return_val_if_fail(match_info != NULL, FALSE); - - return match_info[0].rm_so != -1; -} - -void -i_match_info_free (MatchInfo *match_info) -{ - g_free(match_info); -} diff --git a/src/core/iregex.h b/src/core/iregex.h index 53263944..68156e02 100644 --- a/src/core/iregex.h +++ b/src/core/iregex.h @@ -3,20 +3,10 @@ #include -#ifdef USE_GREGEX - #include typedef GRegex Regex; typedef struct _MatchInfo MatchInfo; -#else - -#include -typedef regex_t Regex; -typedef regmatch_t MatchInfo; - -#endif - gboolean i_match_info_matches (const MatchInfo *match_info); diff --git a/src/core/meson.build b/src/core/meson.build index c0e9b90e..56b6ec77 100644 --- a/src/core/meson.build +++ b/src/core/meson.build @@ -1,11 +1,5 @@ # this file is part of irssi -if want_gregex - regex_impl = files('iregex-gregex.c') -else - regex_impl = files('iregex-regexh.c') -endif - if have_capsicum core_capsicum_source = files('capsicum.c') else @@ -24,6 +18,7 @@ libcore_a = static_library('core', 'core.c', 'expandos.c', 'ignore.c', + 'iregex-gregex.c', 'levels.c', 'line-split.c', 'log-away.c', @@ -58,7 +53,6 @@ libcore_a = static_library('core', 'write-buffer.c', ) + core_capsicum_source - + regex_impl + [ default_config_h, irssi_version_h, diff --git a/src/core/modules-load.c b/src/core/modules-load.c index a3598c65..be1bb385 100644 --- a/src/core/modules-load.c +++ b/src/core/modules-load.c @@ -27,8 +27,6 @@ #include #include -#ifdef HAVE_GMODULE - /* Returns the module name without path, "lib" prefix or ".so" suffix */ static char *module_get_name(const char *path, int *start, int *end) { @@ -395,15 +393,6 @@ static void module_file_deinit_gmodule(MODULE_FILE_REC *file) g_module_close(file->gmodule); } -#else /* !HAVE_GMODULE - modules are not supported */ - -int module_load(const char *path, char **prefixes) -{ - return FALSE; -} - -#endif - void module_file_unload(MODULE_FILE_REC *file) { MODULE_REC *root; @@ -414,10 +403,8 @@ void module_file_unload(MODULE_FILE_REC *file) if (file->initialized) signal_emit("module unloaded", 2, file->root, file); -#ifdef HAVE_GMODULE if (file->gmodule != NULL) module_file_deinit_gmodule(file); -#endif g_free(file->name); g_free(file->defined_module_name); diff --git a/src/core/modules.h b/src/core/modules.h index 1e707c0c..b1ccbae4 100644 --- a/src/core/modules.h +++ b/src/core/modules.h @@ -16,13 +16,7 @@ #define MODULE_DATA(rec) \ g_hash_table_lookup((rec)->module_data, MODULE_NAME) - -#ifdef HAVE_GMODULE -# define MODULE_IS_STATIC(rec) \ - ((rec)->gmodule == NULL) -#else -# define MODULE_IS_STATIC(rec) TRUE -#endif +#define MODULE_IS_STATIC(rec) ((rec)->gmodule == NULL) #define MODULE_ABICHECK(fn_modulename) \ void fn_modulename ## _abicheck(int *version) \ @@ -45,9 +39,7 @@ typedef struct { char *defined_module_name; void (*module_deinit) (void); -#ifdef HAVE_GMODULE GModule *gmodule; /* static, if NULL */ -#endif unsigned int initialized:1; } MODULE_FILE_REC; diff --git a/src/core/network.h b/src/core/network.h index 0747f018..5cd85ccc 100644 --- a/src/core/network.h +++ b/src/core/network.h @@ -1,15 +1,11 @@ #ifndef IRSSI_CORE_NETWORK_H #define IRSSI_CORE_NETWORK_H -#ifdef HAVE_SOCKS_H -#include -#endif - #include -# include -# include -# include -# include +#include +#include +#include +#include #ifndef AF_INET6 # ifdef PF_INET6 diff --git a/src/fe-common/core/fe-modules.c b/src/fe-common/core/fe-modules.c index 01b603f5..1f9e35b7 100644 --- a/src/fe-common/core/fe-modules.c +++ b/src/fe-common/core/fe-modules.c @@ -29,8 +29,6 @@ #include -#ifdef HAVE_GMODULE - static void sig_module_error(void *number, const char *data, const char *rootmodule, const char *submodule) { @@ -271,22 +269,3 @@ void fe_modules_deinit(void) command_unbind("load", (SIGNAL_FUNC) cmd_load); command_unbind("unload", (SIGNAL_FUNC) cmd_unload); } - -#else /* !HAVE_GMODULE */ - -static void cmd_load(const char *data) -{ - printtext(NULL, NULL, MSGLEVEL_CLIENTERROR, - "Dynamic modules loading not supported"); -} - -void fe_modules_init(void) -{ - command_bind("load", NULL, (SIGNAL_FUNC) cmd_load); -} - -void fe_modules_deinit(void) -{ - command_unbind("load", (SIGNAL_FUNC) cmd_load); -} -#endif diff --git a/src/fe-common/irc/fe-common-irc.c b/src/fe-common/irc/fe-common-irc.c index 4658970b..5f097ec2 100644 --- a/src/fe-common/irc/fe-common-irc.c +++ b/src/fe-common/irc/fe-common-irc.c @@ -30,11 +30,6 @@ #include #include -#ifdef HAVE_STATIC_IRC -void fe_irc_modules_init(void); -void fe_irc_modules_deinit(void); -#endif - void fe_irc_queries_init(void); void fe_irc_queries_deinit(void); @@ -105,18 +100,10 @@ void fe_common_irc_init(void) settings_check(); module_register("irc", "fe-common"); - -#ifdef HAVE_STATIC_IRC - fe_irc_modules_init(); -#endif } void fe_common_irc_deinit(void) { -#ifdef HAVE_STATIC_IRC - fe_irc_modules_deinit(); -#endif - fe_irc_channels_deinit(); fe_irc_queries_deinit(); fe_irc_messages_deinit(); diff --git a/src/fe-common/irc/irc-modules.c b/src/fe-common/irc/irc-modules.c deleted file mode 100644 index b8c17d3b..00000000 --- a/src/fe-common/irc/irc-modules.c +++ /dev/null @@ -1,6 +0,0 @@ -#ifdef HAVE_STATIC_IRC -void fe_irc_dcc_init(void);void fe_irc_notifylist_init(void); -void fe_irc_notifylist_deinit(void);void fe_irc_dcc_deinit(void); -void fe_irc_modules_init(void) { fe_irc_dcc_init(); fe_irc_notifylist_init(); } -void fe_irc_modules_deinit(void) { fe_irc_notifylist_deinit(); fe_irc_dcc_deinit(); } -#endif diff --git a/src/fe-common/irc/meson.build b/src/fe-common/irc/meson.build index aff70f71..5af5528a 100644 --- a/src/fe-common/irc/meson.build +++ b/src/fe-common/irc/meson.build @@ -20,8 +20,6 @@ libfe_common_irc_a = static_library('fe_common_irc', 'fe-whois.c', 'irc-completion.c', 'module-formats.c', - - 'irc-modules.c', ), include_directories : rootinc, implicit_include_directories : false, diff --git a/src/fe-none/irssi.c b/src/fe-none/irssi.c index b33a4c5c..f2724443 100644 --- a/src/fe-none/irssi.c +++ b/src/fe-none/irssi.c @@ -26,16 +26,6 @@ #include #include -#ifdef HAVE_STATIC_PERL -void perl_core_init(void); -void perl_core_deinit(void); -#endif - -#ifdef HAVE_STATIC_IRC -void irc_init(void); -void irc_deinit(void); -#endif - static GMainLoop *main_loop; static char *autoload_module; static int reload; @@ -73,19 +63,12 @@ void noui_init(void) irssi_gui = IRSSI_GUI_NONE; core_init(); -#ifdef HAVE_STATIC_IRC - irc_init(); -#endif module_register("core", "fe-none"); signal_add("reload", (SIGNAL_FUNC) sig_reload); signal_add("gui exit", (SIGNAL_FUNC) sig_exit); -#ifdef HAVE_STATIC_PERL - perl_core_init(); -#endif - autoload_modules(); signal_emit("irssi init finished", 0); @@ -93,15 +76,8 @@ void noui_init(void) void noui_deinit(void) { -#ifdef HAVE_STATIC_PERL - perl_core_deinit(); -#endif - signal_remove("reload", (SIGNAL_FUNC) sig_reload); signal_remove("gui exit", (SIGNAL_FUNC) sig_exit); -#ifdef HAVE_STATIC_IRC - irc_deinit(); -#endif core_deinit(); } @@ -118,9 +94,6 @@ int main(int argc, char **argv) args_execute(argc, argv); core_preinit(argv[0]); -#ifdef HAVE_SOCKS - SOCKSinit(argv[0]); -#endif noui_init(); if (autoload_module == NULL) diff --git a/src/fe-text/irssi.c b/src/fe-text/irssi.c index 34341c9b..76bc5dfd 100644 --- a/src/fe-text/irssi.c +++ b/src/fe-text/irssi.c @@ -46,27 +46,6 @@ #include #include -#ifdef HAVE_STATIC_PERL -void perl_core_init(void); -void perl_core_deinit(void); - -void fe_perl_init(void); -void fe_perl_deinit(void); -#endif - -#ifdef HAVE_STATIC_OTR -void otr_core_init(void); -void otr_core_deinit(void); -#endif - -#ifdef HAVE_STATIC_IRC -void irc_init(void); -void irc_deinit(void); - -void fe_common_irc_init(void); -void fe_common_irc_deinit(void); -#endif - void gui_expandos_init(void); void gui_expandos_deinit(void); @@ -170,13 +149,7 @@ static void textui_init(void) irssi_gui = IRSSI_GUI_TEXT; core_init(); -#ifdef HAVE_STATIC_IRC - irc_init(); -#endif fe_common_core_init(); -#ifdef HAVE_STATIC_IRC - fe_common_irc_init(); -#endif theme_register(gui_text_formats); signal_add("settings userinfo changed", (SIGNAL_FUNC) sig_settings_userinfo_changed); @@ -222,15 +195,6 @@ static void textui_finish_init(void) module_register("core", "fe-text"); -#ifdef HAVE_STATIC_PERL - perl_core_init(); - fe_perl_init(); -#endif - -#ifdef HAVE_STATIC_OTR - otr_core_init(); -#endif - dirty_check(); /* Temporarily raise the fatal level to abort on config errors. */ @@ -273,15 +237,6 @@ static void textui_deinit(void) while (modules != NULL) module_unload(modules->data); -#ifdef HAVE_STATIC_PERL - perl_core_deinit(); - fe_perl_deinit(); -#endif - -#ifdef HAVE_STATIC_OTR - otr_core_deinit(); -#endif - dirty_check(); /* one last time to print any quit messages */ signal_remove("settings userinfo changed", (SIGNAL_FUNC) sig_settings_userinfo_changed); signal_remove("module autoload", (SIGNAL_FUNC) sig_autoload_modules); @@ -307,13 +262,7 @@ static void textui_deinit(void) theme_unregister(); -#ifdef HAVE_STATIC_IRC - fe_common_irc_deinit(); -#endif fe_common_core_deinit(); -#ifdef HAVE_STATIC_IRC - irc_deinit(); -#endif core_deinit(); } @@ -354,10 +303,6 @@ int main(int argc, char **argv) check_files(); -#ifdef HAVE_SOCKS - SOCKSinit(argv[0]); -#endif - /* setlocale() must be called at the beginning before any calls that affect it, especially regexps seem to break if they're generated before this call. diff --git a/src/irc/dcc/dcc-queue.h b/src/irc/dcc/dcc-queue.h index 1ab4ecbf..08dcee38 100644 --- a/src/irc/dcc/dcc-queue.h +++ b/src/irc/dcc/dcc-queue.h @@ -1,5 +1,5 @@ -#ifndef IRSSI_IRC_DCC_DCC_QUEUE_H_ -#define IRSSI_IRC_DCC_DCC_QUEUE_H_ +#ifndef IRSSI_IRC_DCC_DCC_QUEUE_H +#define IRSSI_IRC_DCC_DCC_QUEUE_H #include diff --git a/src/irc/irc.c b/src/irc/irc.c deleted file mode 100644 index 5780a965..00000000 --- a/src/irc/irc.c +++ /dev/null @@ -1,7 +0,0 @@ -#ifdef HAVE_STATIC_IRC -void irc_core_init(void); void irc_core_deinit(void); -void irc_dcc_init(void);void irc_flood_init(void);void irc_notifylist_init(void); -void irc_notifylist_deinit(void);void irc_flood_deinit(void);void irc_dcc_deinit(void); -void irc_init(void) { irc_core_init(); irc_dcc_init(); irc_flood_init(); irc_notifylist_init(); } -void irc_deinit(void) { irc_notifylist_deinit(); irc_flood_deinit(); irc_dcc_deinit(); irc_core_deinit(); } -#endif diff --git a/src/perl/irssi-core.pl b/src/perl/irssi-core.pl index 46066a38..cf987b31 100644 --- a/src/perl/irssi-core.pl +++ b/src/perl/irssi-core.pl @@ -1,9 +1,7 @@ # NOTE: this is printed through printf()-like function, # so no extra percent characters. -# %%d : must be first - 1 if perl libraries are to be linked -# statically with irssi binary, 0 if not -# %%s : must be second - use Irssi; use Irssi::Irc; etc.. +# %%s : use Irssi; use Irssi::Irc; etc.. package Irssi::Core; use Symbol; @@ -15,7 +13,7 @@ $SIG{__WARN__} = sub { }; sub is_static { - return %d; + return 0; } sub destroy { diff --git a/src/perl/meson.build b/src/perl/meson.build index f685fb0d..ad996acf 100644 --- a/src/perl/meson.build +++ b/src/perl/meson.build @@ -30,7 +30,6 @@ libperl_core_sm = shared_module('perl_core', c_args : [ def_scriptdir, def_perl_use_lib, - '-D' + 'PERL_STATIC_LIBS' + '=' + 0.to_string(), ], include_directories : [ rootinc ] + [ generated_files_inc ], implicit_include_directories : false, diff --git a/src/perl/perl-core.c b/src/perl/perl-core.c index 24f0218c..79d5c13c 100644 --- a/src/perl/perl-core.c +++ b/src/perl/perl-core.c @@ -77,31 +77,10 @@ static void perl_script_destroy(PERL_SCRIPT_REC *script) extern void boot_DynaLoader(pTHX_ CV* cv); -#if PERL_STATIC_LIBS == 1 -extern void boot_Irssi(pTHX_ CV *cv); - -XS(boot_Irssi_Core) -{ - dXSARGS; - PERL_UNUSED_VAR(items); - - irssi_callXS(boot_Irssi, cv, mark); - irssi_boot(Irc); - irssi_boot(UI); - irssi_boot(TextUI); - /* Make sure to keep this in line with perl_scripts_deinit below. */ - XSRETURN_YES; -} -#endif - static void xs_init(pTHX) { dXSUB_SYS; -#if PERL_STATIC_LIBS == 1 - newXS("Irssi::Core::boot_Irssi_Core", boot_Irssi_Core, __FILE__); -#endif - /* boot the dynaloader too, if we want to use some other dynamic modules.. */ newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, __FILE__); @@ -120,14 +99,11 @@ void perl_scripts_init(void) perl_construct(my_perl); perl_parse(my_perl, xs_init, G_N_ELEMENTS(perl_args)-1, perl_args, NULL); -#if PERL_STATIC_LIBS == 1 - perl_eval_pv("Irssi::Core::->boot_Irssi_Core(0.9);", TRUE); -#endif perl_common_start(); use_code = perl_get_use_list(); - code = g_strdup_printf(irssi_core_code, PERL_STATIC_LIBS, use_code); + code = g_strdup_printf(irssi_core_code, use_code); perl_eval_pv(code, TRUE); g_free(code); @@ -153,17 +129,6 @@ void perl_scripts_deinit(void) /* Unload all perl libraries loaded with dynaloader */ perl_eval_pv("foreach my $lib (@DynaLoader::dl_modules) { if ($lib =~ /^Irssi\\b/) { $lib .= '::deinit();'; eval $lib; } }", TRUE); -#if PERL_STATIC_LIBS == 1 - /* If perl is statically built we should manually deinit the modules - which are booted in boot_Irssi_Core above */ - perl_eval_pv("foreach my $lib (qw(" - "Irssi" " " - "Irssi::Irc" " " - "Irssi::UI" " " - "Irssi::TextUI" - ")) { eval $lib . '::deinit();'; }", TRUE); -#endif - /* We could unload all libraries .. but this crashes with some libraries, probably because we don't call some deinit function.. Anyway, this would free some memory with /SCRIPT RESET, but it