From 47f129e0a53905dada8a24cc48d107449c81aa51 Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Fri, 22 Aug 2008 11:54:32 +0000 Subject: 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 --- src/perl/perl-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3