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:
Timo Sirainen 2000-08-30 22:29:55 +00:00 committed by cras
commit b4bdec4436
15 changed files with 78 additions and 75 deletions

View file

@ -3,12 +3,11 @@
#include "servers.h"
#define IS_SERVER_SETUP(server) \
((server) != NULL && \
module_find_id("SERVER SETUP", (server)->type) != -1)
#define SERVER_SETUP(server) \
(IS_SERVER_SETUP(server) ? (SERVER_SETUP_REC *) (server) : NULL)
MODULE_CHECK_CAST(server, SERVER_SETUP_REC, type, "SERVER SETUP")
#define IS_SERVER_SETUP(server) \
(SERVER_SETUP(server) ? TRUE : FALSE)
/* servers */
typedef struct {