summaryrefslogtreecommitdiff
path: root/src/core/modules.h
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-10-02 07:55:51 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-10-02 07:55:51 +0000
commitc988af4150dba4d429496fe5e36fd219377a0935 (patch)
treec50d3e6d84deb3a856b9dcf3da63b13b376f2f8c /src/core/modules.h
parent56331f78e0742b0418a4259e65ee1a00daa923d6 (diff)
downloadirssi-c988af4150dba4d429496fe5e36fd219377a0935.zip
Added MODULE_DATA_UNSET() macro and started using it. Just to make sure we
don't try to access free'd data. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1818 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/modules.h')
-rw-r--r--src/core/modules.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/modules.h b/src/core/modules.h
index bf2dba31..5677cace 100644
--- a/src/core/modules.h
+++ b/src/core/modules.h
@@ -10,6 +10,9 @@
#define MODULE_DATA_SET(rec, data) \
g_hash_table_insert((rec)->module_data, MODULE_NAME, data)
+#define MODULE_DATA_UNSET(rec) \
+ g_hash_table_remove((rec)->module_data, MODULE_NAME)
+
#define MODULE_DATA(rec) \
g_hash_table_lookup((rec)->module_data, MODULE_NAME)