Mercurial > pidgin
changeset 2329:a6d0edc31554
[gaim-migrate @ 2339]
load perl on demand
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 20 Sep 2001 19:09:42 +0000 |
parents | 14c8df9cc75f |
children | b618d7a4d9a6 |
files | src/aim.c src/gaim.h src/perl.c |
diffstat | 3 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/aim.c Thu Sep 20 19:03:57 2001 +0000 +++ b/src/aim.c Thu Sep 20 19:09:42 2001 +0000 @@ -617,7 +617,6 @@ gtkspell_start(NULL, ispell_cmd); #ifdef USE_PERL - perl_init(); perl_autoload(); #endif static_proto_init();
--- a/src/gaim.h Thu Sep 20 19:03:57 2001 +0000 +++ b/src/gaim.h Thu Sep 20 19:09:42 2001 +0000 @@ -792,7 +792,6 @@ /* Functions in perl.c */ #ifdef USE_PERL -extern void perl_init(); extern void perl_autoload(); extern int perl_load_file(char *); extern void perl_end();
--- a/src/perl.c Thu Sep 20 19:03:57 2001 +0000 +++ b/src/perl.c Thu Sep 20 19:09:42 2001 +0000 @@ -82,6 +82,7 @@ static GList *perl_event_handlers = NULL; static PerlInterpreter *my_perl = NULL; static char* last_dir = NULL; +static void perl_init(); /* dealing with gaim */ XS(XS_GAIM_register); /* set up hooks for script */ @@ -146,6 +147,8 @@ int perl_load_file(char *script_name) { SV *return_val; + if (my_perl == NULL) + perl_init(); return_val = execute_perl("load_file", script_name); return SvNV (return_val); } @@ -186,7 +189,7 @@ g_free(path); } -void perl_init() +static void perl_init() { char *perl_args[] = {"", "-e", "0", "-w"}; char load_file[] =