diff options
author | Timo Sirainen <cras@irssi.org> | 2001-11-18 16:16:13 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-11-18 16:16:13 +0000 |
commit | 51db872da004bf9d2f8bb92c6636bee20d122ee1 (patch) | |
tree | 60b56dfd9ed7405d7ef372f5ce64df3f51718231 /src/perl/perl-core.c | |
parent | 034e75ee196393338adf26936f7c3c80ad6d6fac (diff) | |
download | irssi-51db872da004bf9d2f8bb92c6636bee20d122ee1.zip |
/SCRIPT UNLOAD didn't destroy the perl package from memory. Also the scripts
weren't destroyed when error occured in them.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2053 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/perl-core.c')
-rw-r--r-- | src/perl/perl-core.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/perl/perl-core.c b/src/perl/perl-core.c index 29ce0308..e24bff1b 100644 --- a/src/perl/perl-core.c +++ b/src/perl/perl-core.c @@ -144,9 +144,9 @@ void perl_scripts_deinit(void) if (my_perl == NULL) return; - /* destroy all scripts */ + /* unload all scripts */ while (perl_scripts != NULL) - perl_script_destroy(perl_scripts->data); + perl_script_unload(perl_scripts->data); signal_emit("perl scripts deinit", 0); @@ -164,15 +164,6 @@ void perl_scripts_deinit(void) my_perl = NULL; } -/* Unload perl script */ -void perl_script_unload(PERL_SCRIPT_REC *script) -{ - g_return_if_fail(script != NULL); - - perl_script_destroy_package(script); - perl_script_destroy(script); -} - static char *script_file_get_name(const char *path) { char *name, *ret, *p; @@ -300,6 +291,15 @@ PERL_SCRIPT_REC *perl_script_load_data(const char *data) return script_load(name, NULL, data); } +/* Unload perl script */ +void perl_script_unload(PERL_SCRIPT_REC *script) +{ + g_return_if_fail(script != NULL); + + perl_script_destroy_package(script); + perl_script_destroy(script); +} + /* Find loaded script by name */ PERL_SCRIPT_REC *perl_script_find(const char *name) { @@ -415,7 +415,7 @@ static void sig_script_error(PERL_SCRIPT_REC *script, const char *error) } if (script != NULL) { - perl_script_destroy(script); + perl_script_unload(script); signal_stop(); } } |