diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2008-08-22 11:54:32 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2008-08-22 11:54:32 +0000 |
commit | 47f129e0a53905dada8a24cc48d107449c81aa51 (patch) | |
tree | 295d4879c7a87d258d3457deff8be743475cd113 /src | |
parent | 7e3bf21139d0ea4d0bb7c85f633f73344a65e999 (diff) | |
download | irssi-47f129e0a53905dada8a24cc48d107449c81aa51.zip |
Call PERL_SYS_INIT3() and PERL_SYS_TERM() as documented in perlembed(1), patch
by Gerfried Fuchs (debian bug #495059).
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4871 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/perl/perl-core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/perl/perl-core.c b/src/perl/perl-core.c index 1814ef36..5c418928 100644 --- a/src/perl/perl-core.c +++ b/src/perl/perl-core.c @@ -112,16 +112,18 @@ static void xs_init(pTHX) void perl_scripts_init(void) { char *args[] = {"", "-e", "0"}; + int argc = 3; char *code, *use_code; perl_scripts = NULL; perl_sources_start(); perl_signals_start(); + PERL_SYS_INIT3(&argc, &args, &environ); my_perl = perl_alloc(); perl_construct(my_perl); - perl_parse(my_perl, xs_init, 3, args, NULL); + perl_parse(my_perl, xs_init, &argc, args, NULL); #if PERL_STATIC_LIBS == 1 perl_eval_pv("Irssi::Core::boot_Irssi_Core();", TRUE); #endif @@ -165,6 +167,7 @@ void perl_scripts_deinit(void) PL_perl_destruct_level = 1; perl_destruct(my_perl); perl_free(my_perl); + PERL_SYS_TERM(); my_perl = NULL; } |