87 #define QOF_ID_NONE NULL
88 #define QOF_ID_NULL "null"
90 #define QOF_ID_BOOK "Book"
91 #define QOF_ID_SESSION "Session"
94 #define QOF_ENTITY(object) ((QofEntity *)(object))
97 #define QSTRCMP(da,db) ({ \
100 if ((da) != (db)) { \
101 val = strcmp ((da), (db)); \
104 if ((!(da)) && (db)) { \
107 if ((da) && (!(db))) { \
114 #define QOF_CHECK_TYPE(obj,type) (((obj) != NULL) && \
115 (0 == QSTRCMP((type),(((QofEntity *)(obj))->e_type))))
119 #define QOF_CHECK_CAST(obj,e_type,c_type) ( \
120 QOF_CHECK_TYPE((obj),(e_type)) ? \
123 g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, \
124 "Error: Bad QofEntity at %s:%d", __FILE__, __LINE__); \