1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-27 05:20:20 -04:00

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
This commit is contained in:
Timo Sirainen 2001-02-14 22:06:47 +00:00 committed by cras
parent f4aef7c706
commit bebb9d3de8
2 changed files with 9 additions and 7 deletions

View File

@ -1,6 +1,8 @@
#ifndef __PERL_COMMON_H #ifndef __PERL_COMMON_H
#define __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 */ /* helper defines */
#define new_pv(a) \ #define new_pv(a) \
(newSVpv((a) == NULL ? "" : (a), (a) == NULL ? 0 : strlen(a))) (newSVpv((a) == NULL ? "" : (a), (a) == NULL ? 0 : strlen(a)))

View File

@ -44,7 +44,7 @@ typedef struct {
static GSList *perl_sources; static GSList *perl_sources;
static GSList *perl_scripts; static GSList *perl_scripts;
static PerlInterpreter *irssi_perl_interp; PerlInterpreter *my_perl;
static void perl_source_destroy(PERL_SOURCE_REC *rec) static void perl_source_destroy(PERL_SOURCE_REC *rec)
{ {
@ -90,10 +90,10 @@ static void irssi_perl_start(void)
perl_signals_start(); perl_signals_start();
perl_sources = NULL; perl_sources = NULL;
irssi_perl_interp = perl_alloc(); my_perl = perl_alloc();
perl_construct(irssi_perl_interp); 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_eval_pv(eval_file_code, TRUE);
perl_common_init(); perl_common_init();
@ -175,9 +175,9 @@ static void irssi_perl_stop(void)
perl_common_deinit(); perl_common_deinit();
/* perl interpreter */ /* perl interpreter */
perl_destruct(irssi_perl_interp); perl_destruct(my_perl);
perl_free(irssi_perl_interp); perl_free(my_perl);
irssi_perl_interp = NULL; my_perl = NULL;
} }
static void script_fix_name(char *name) static void script_fix_name(char *name)