1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

/SCRIPT RESET didn't work properly (start/stop functions were called in

wrong order). Added a few extra deinits.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1712 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-08-07 15:25:41 +00:00 committed by cras
parent 1db558b8ea
commit b80d4e62ab
3 changed files with 7 additions and 3 deletions

View File

@ -561,12 +561,15 @@ void perl_common_stop(void)
{ {
g_hash_table_foreach(iobject_stashes, (GHFunc) free_iobject_hash, NULL); g_hash_table_foreach(iobject_stashes, (GHFunc) free_iobject_hash, NULL);
g_hash_table_destroy(iobject_stashes); g_hash_table_destroy(iobject_stashes);
iobject_stashes = NULL;
g_hash_table_foreach(plain_stashes, (GHFunc) g_free, NULL); g_hash_table_foreach(plain_stashes, (GHFunc) g_free, NULL);
g_hash_table_destroy(plain_stashes); g_hash_table_destroy(plain_stashes);
plain_stashes = NULL;
g_slist_foreach(use_protocols, (GFunc) g_free, NULL); g_slist_foreach(use_protocols, (GFunc) g_free, NULL);
g_slist_free(use_protocols); g_slist_free(use_protocols);
use_protocols = NULL;
signal_remove("chat protocol created", (SIGNAL_FUNC) perl_register_protocol); signal_remove("chat protocol created", (SIGNAL_FUNC) perl_register_protocol);
signal_remove("chat protocol destroyed", (SIGNAL_FUNC) perl_unregister_protocol); signal_remove("chat protocol destroyed", (SIGNAL_FUNC) perl_unregister_protocol);

View File

@ -94,14 +94,14 @@ void perl_scripts_init(void)
perl_parse(my_perl, xs_init, 3, args, NULL); perl_parse(my_perl, xs_init, 3, args, NULL);
perl_common_start();
use_code = perl_get_use_list(); use_code = perl_get_use_list();
code = g_strdup_printf(irssi_core_code, use_code); code = g_strdup_printf(irssi_core_code, use_code);
perl_eval_pv(code, TRUE); perl_eval_pv(code, TRUE);
g_free(code); g_free(code);
g_free(use_code); g_free(use_code);
perl_common_start();
} }
/* Destroy all perl scripts and deinitialize perl interpreter */ /* Destroy all perl scripts and deinitialize perl interpreter */

View File

@ -435,6 +435,7 @@ void perl_signals_stop(void)
g_hash_table_foreach(signals[n], g_hash_table_foreach(signals[n],
(GHFunc) signal_destroy_hash, NULL); (GHFunc) signal_destroy_hash, NULL);
g_hash_table_destroy(signals[n]); g_hash_table_destroy(signals[n]);
signals[n] = NULL;
} }
} }