mirror of
https://github.com/irssi/irssi.git
synced 2026-08-16 23:22:16 +02:00
Object type checking fixes
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@638 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
cf7eb945ea
commit
b4bdec4436
15 changed files with 78 additions and 75 deletions
|
|
@ -1,13 +1,14 @@
|
|||
#ifndef __IRC_CHATNETS_H
|
||||
#define __IRC_CHATNETS_H
|
||||
|
||||
#define IS_IRC_CHATNET(chatnet) \
|
||||
((chatnet) != NULL && \
|
||||
module_find_id("IRC CHATNET", (chatnet)->chat_type) != -1)
|
||||
#include "modules.h"
|
||||
|
||||
/* returns IRC_CHATNET_REC if it's IRC network, NULL if it isn't */
|
||||
#define IRC_CHATNET(chatnet) \
|
||||
(IS_IRC_CHATNET(chatnet) ? (IRC_CHATNET_REC *) (chatnet) : NULL)
|
||||
MODULE_CHECK_CAST(chatnet, IRC_CHATNET_REC, chat_type, "IRC CHATNET")
|
||||
|
||||
#define IS_IRC_CHATNET(chatnet) \
|
||||
(IRC_CHATNET(chatnet) ? TRUE : FALSE)
|
||||
|
||||
#define IS_IRCNET(ircnet) IS_IRC_CHATNET(ircnet)
|
||||
#define IRCNET(ircnet) IRC_CHATNET(ircnet)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue