mirror of
https://github.com/irssi/irssi.git
synced 2026-08-16 15:12:11 +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
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue