From bebb9d3de8b364dcb6b472161686baf39c325a6b Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 14 Feb 2001 22:06:47 +0000 Subject: [PATCH] irssi_perl_interp -> my_perl and made it non-static. should help compiling with some weird perl implementations. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1213 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/perl/perl-common.h | 2 ++ src/perl/perl.c | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/perl/perl-common.h b/src/perl/perl-common.h index e6519681..d01d014b 100644 --- a/src/perl/perl-common.h +++ b/src/perl/perl-common.h @@ -1,6 +1,8 @@ #ifndef __PERL_COMMON_H #define __PERL_COMMON_H +extern PerlInterpreter *my_perl; /* must be called my_perl or some perl implementations won't work */ + /* helper defines */ #define new_pv(a) \ (newSVpv((a) == NULL ? "" : (a), (a) == NULL ? 0 : strlen(a))) diff --git a/src/perl/perl.c b/src/perl/perl.c index aaf1ce99..072737b6 100644 --- a/src/perl/perl.c +++ b/src/perl/perl.c @@ -44,7 +44,7 @@ typedef struct { static GSList *perl_sources; static GSList *perl_scripts; -static PerlInterpreter *irssi_perl_interp; +PerlInterpreter *my_perl; static void perl_source_destroy(PERL_SOURCE_REC *rec) { @@ -90,10 +90,10 @@ static void irssi_perl_start(void) perl_signals_start(); perl_sources = NULL; - irssi_perl_interp = perl_alloc(); - perl_construct(irssi_perl_interp); + my_perl = perl_alloc(); + perl_construct(my_perl); - perl_parse(irssi_perl_interp, xs_init, 3, args, NULL); + perl_parse(my_perl, xs_init, 3, args, NULL); perl_eval_pv(eval_file_code, TRUE); perl_common_init(); @@ -175,9 +175,9 @@ static void irssi_perl_stop(void) perl_common_deinit(); /* perl interpreter */ - perl_destruct(irssi_perl_interp); - perl_free(irssi_perl_interp); - irssi_perl_interp = NULL; + perl_destruct(my_perl); + perl_free(my_perl); + my_perl = NULL; } static void script_fix_name(char *name)