summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-05-22 10:10:57 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-05-22 10:10:57 +0200
commit9fca0e3b8d6517b85fa60271338873dd0127b62b (patch)
tree2c871ecbb77bcc02c86ced9b2d8e914f842d5ab1
parent6b6f00e03a1e6b9309699ae5ff603dbb79af7856 (diff)
downloadedoors-9fca0e3b8d6517b85fa60271338873dd0127b62b.zip
edoors-9fca0e3b8d6517b85fa60271338873dd0127b62b.tar.gz
eiotas_private.h: add CHECK_USERBITS macro
-rw-r--r--src/lib/eiotas_private.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/eiotas_private.h b/src/lib/eiotas_private.h
index d522e5d..c57b5a4 100644
--- a/src/lib/eiotas_private.h
+++ b/src/lib/eiotas_private.h
@@ -56,6 +56,22 @@
} \
eina_hash_direct_add(_parent->children,_iota->name,_iota);
+#define CHECK_USERBITS(_userbits) \
+ if(_userbits->data==NULL) { \
+ ERR("userbits->data NULL is not allowed"); \
+ return NULL; \
+ } \
+ if(_userbits->free_fct==NULL) { \
+ ERR("userbits->free_fct NULL is not allowed"); \
+ return NULL; \
+ } \
+ if(_userbits->recv_fct==NULL) { \
+ ERR("userbits->recv_fct NULL is not allowed"); \
+ return NULL; \
+ } \
+
+/* TODO userbits->start_fct; userbits->stop_fct; userbits->suspend_fct; userbits->resume_fct; */
+
#ifdef CRITICAL
#undef CRITICAL
#endif