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,13 +3,12 @@
#include "servers.h"
#define IS_QUERY(query) \
((query) != NULL && \
module_find_id("QUERY", ((QUERY_REC *) (query))->type) != -1)
/* Returns QUERY_REC if it's query, NULL if it isn't. */
#define QUERY(query) \
(IS_QUERY(query) ? (QUERY_REC *) (query) : NULL)
MODULE_CHECK_CAST(query, QUERY_REC, type, "QUERY")
#define IS_QUERY(query) \
(QUERY(query) ? TRUE : FALSE)
#define STRUCT_SERVER_REC SERVER_REC
typedef struct {