diff options
author | Christopher Davis <loafier@gmail.com> | 2006-06-23 03:51:52 +0000 |
---|---|---|
committer | Christopher Davis <loafier@gmail.com> | 2006-06-23 03:51:52 +0000 |
commit | 4d33c04f15e60e21a537edd635c9ac130312a3cb (patch) | |
tree | 9530c793afd67ef5c8319c452d33011c7f7fe197 /pyloader.c | |
parent | c76f11d4ead827d8e87e265131a3dee534bc0792 (diff) | |
download | irssi-python-4d33c04f15e60e21a537edd635c9ac130312a3cb.tar.gz irssi-python-4d33c04f15e60e21a537edd635c9ac130312a3cb.tar.xz irssi-python-4d33c04f15e60e21a537edd635c9ac130312a3cb.zip |
Began work on signal handler/map system. It seems to be working;
however, events with varying <cmd> text aren't handled because
it does a straight lookup in the hashtable with the signal name
to locate the argument list. Will need to change the system to
accomodate the <cmd> events.
The basics for reference arg support is there but not well tested.
git-svn-id: http://svn.irssi.org/repos/irssi-python@4289 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'pyloader.c')
-rw-r--r-- | pyloader.c | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -288,6 +288,20 @@ int pyloader_init(void) return 1; } +static void py_clear_scripts() +{ + int i; + + for (i = 0; i < PyList_Size(script_modules); i++) + { + PyObject *scr = PyList_GET_ITEM(script_modules, i); + pyscript_remove_signals(scr); + pyscript_clear_modules(scr); + } + + Py_DECREF(script_modules); +} + void pyloader_deinit(void) { GSList *node; @@ -300,7 +314,5 @@ void pyloader_deinit(void) g_slist_free(script_paths); script_paths = NULL; - /* script specific resources (cmd + signal handlers) should be removed - by the object's destructor */ - Py_DECREF(script_modules); + py_clear_scripts(); } |