From: Tim B. <tbi...@us...> - 2005-10-06 21:37:51
|
Update of /cvsroot/aaf/AAF/ref-impl/src/OM In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24546/ref-impl/src/OM Modified Files: OMAssertions.h Log Message: Add the ASSERTU() macro - a replacement, in existing code, for the ISO assert() macro from <assert.h>, for assertions in new code see OMAssertions.h Index: OMAssertions.h =================================================================== RCS file: /cvsroot/aaf/AAF/ref-impl/src/OM/OMAssertions.h,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** OMAssertions.h 10 Sep 2004 17:13:10 -0000 1.37 --- OMAssertions.h 6 Oct 2005 21:37:40 -0000 1.38 *************** *** 14,18 **** // under the License. // ! // The Original Code of this file is Copyright 1998-2004, Licensor of the // AAF Association. // --- 14,18 ---- // under the License. // ! // The Original Code of this file is Copyright 1998-2005, Licensor of the // AAF Association. // *************** *** 269,272 **** --- 269,291 ---- oldValueOf##name + // @func Assert (when enabled with OM_DEBUG) that the + // condition <p expression> is true. + // Please don't use this macro in new code. It is intended + // only as a quick replacement, in existing code, for the ISO + // assert() macro from <assert.h>. In new code, please use + // <f ASSERT>, or one of the other macros defined here. + // @parm The condition expression. The expression should be + // free of side effects. + #define ASSERTU(expression) \ + (expression) \ + ? (void)0 \ + : assertionViolation( \ + "Assertion", \ + "Unknown (assertion name not supplied by developer)", \ + #expression, \ + "Unknown (routine name not supplied by developer)", \ + __FILE__, \ + __LINE__) + #else *************** *** 297,300 **** --- 316,321 ---- #define OLD(name) + #define ASSERTU(expression) + #endif |