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