summaryrefslogtreecommitdiff
path: root/src/core/chatnets.h
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-08-30 22:29:55 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-08-30 22:29:55 +0000
commitb4bdec4436190d7ccb6252be388b5ee70c5c36f5 (patch)
tree5b80eb0eab42f347575c05dbff3361f9955cd6ee /src/core/chatnets.h
parentcf7eb945ea769b51622a1c1cbbbc7e7a6a494df9 (diff)
downloadirssi-b4bdec4436190d7ccb6252be388b5ee70c5c36f5.zip
Object type checking fixes
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@638 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/chatnets.h')
-rw-r--r--src/core/chatnets.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/chatnets.h b/src/core/chatnets.h
index 724421cf..7170c478 100644
--- a/src/core/chatnets.h
+++ b/src/core/chatnets.h
@@ -3,13 +3,12 @@
#include "modules.h"
-#define IS_CHATNET(chatnet) \
- ((chatnet) != NULL && \
- module_find_id("CHATNET", (chatnet)->type) != -1)
-
/* Returns CHATNET_REC if it's chatnet, NULL if it isn't. */
#define CHATNET(chatnet) \
- (IS_CHATNET(chatnet) ? (CHATNET_REC *) (chatnet) : NULL)
+ MODULE_CHECK_CAST(chatnet, CHATNET_REC, type, "CHATNET")
+
+#define IS_CHATNET(chatnet) \
+ (CHATNET(chatnet) ? TRUE : FALSE)
typedef struct {
#include "chatnet-rec.h"