diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-24 10:52:06 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-24 10:52:06 +0200 |
commit | 8eb10a7105dce1dc3ffc44b291de73d82bd04799 (patch) | |
tree | e3c70740599127009b6009a2846d8274e67c8900 /runtime/obj-types.h | |
parent | 675d46f5b59f64e378968baa5e0dec6810090287 (diff) | |
parent | c53ca3a23429e750aeb6ab1c3600ae8ecb3c8ac6 (diff) | |
download | rsyslog-8eb10a7105dce1dc3ffc44b291de73d82bd04799.tar.gz rsyslog-8eb10a7105dce1dc3ffc44b291de73d82bd04799.tar.bz2 rsyslog-8eb10a7105dce1dc3ffc44b291de73d82bd04799.zip |
Merge branch 'omfile'
Conflicts:
ChangeLog
Diffstat (limited to 'runtime/obj-types.h')
-rw-r--r-- | runtime/obj-types.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/obj-types.h b/runtime/obj-types.h index 78829f94..6c1381ac 100644 --- a/runtime/obj-types.h +++ b/runtime/obj-types.h @@ -105,12 +105,13 @@ struct obj_s { /* the dummy struct that each derived class can be casted to */ # define ISOBJ_TYPE_assert(pObj, objType) \ do { \ ASSERT(pObj != NULL); \ - ASSERT((unsigned) ((obj_t*) (pObj))->iObjCooCKiE == (unsigned) 0xBADEFEE); \ if(strcmp((char*)(((obj_t*)pObj)->pObjInfo->pszID), #objType)) { \ dbgprintf("%s:%d ISOBJ assert failure: invalid object type, expected '%s' " \ - "actual '%s'\n", __FILE__, __LINE__, #objType, (((obj_t*)pObj)->pObjInfo->pszID)); \ + "actual '%s', cookie: %X\n", __FILE__, __LINE__, #objType, \ + (((obj_t*)pObj)->pObjInfo->pszID), ((obj_t*)(pObj))->iObjCooCKiE); \ assert(0); /* trigger assertion, messge we already have */ \ } \ + ASSERT((unsigned) ((obj_t*)(pObj))->iObjCooCKiE == (unsigned) 0xBADEFEE); \ } while(0) #else /* non-debug mode, no checks but much faster */ # define BEGINobjInstance obj_t objData |