mirror of
https://github.com/irssi/irssi.git
synced 2026-08-19 16:42:30 +02:00
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)
This commit is contained in:
parent
3a5f93bbcc
commit
883510a3fd
22 changed files with 20 additions and 338 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue